DATAKIT SDK  V2026.2
dtk_RevitReader.hpp
Go to the documentation of this file.
1 /**********************************************************
2  Dtk_RevitReader.hpp
3 ***********************************************************/
4 #ifndef _DTK_REVIT_READER_HPP_
5 #define _DTK_REVIT_READER_HPP_
6 #include "util/dtk_reader.hpp"
7 #include "def/define.h"
8 
9 class RevitReader: public Dtk_Reader
10 {
11 protected :
12 public :
13  enum class LevelOfDetail
14  {
15  ReaderGuessed = 0,
16  Coarse = 1,
17  Medium = 2,
18  Detailed = 3
19  };
20  enum class VisualStyle
21  {
22  ReaderGuessed = 0,
23  Shaded = 1,
24  Textures = 2,
25  Realistic = 3
26  };
27  virtual ~RevitReader() = 0;
28  static Dtk_bool Enable();
29  //! [Options]
30  //! \brief Determine which Revit visual style to use for convertion. The visual style determines which material color to apply on objects with material. See Autodesk documentation on Revit Visual Styles for detailed information.
31  //! \param The desired visual style to use for convertion.
32  //! \warning please call it after Dtk_API initialization and before the Dtk_API::OpenDocument call.
33  //! \remark VisualStyle::Realistic usage toggles the retrieving of texture information.
34  //! \remark Texture files are searched in current folder and default Autodesk installation folder.
36 
37  //! \brief Use to render as in revit "Realistic" and "Texture" visual style for views (with textures). By default, texture reading is disabled (as in "Shaded" style).
38  //! \param DTK_TRUE to render texture or DTK_FALSE otherwise.
39  //! \warning please call it after Dtk_API initialization and before the Dtk_API::OpenDocument call.
40  //! \remark Texture files are searched in current folder and default Autodesk installation folder
41  //! \deprecated Use SetConfigRevitVisualStyle( VisualStyle ) instead.
42  SetAsDeprecated( "2025.4", "Use SetConfigRevitVisualStyle( VisualStyle ) instead." )
43  static void SetConfigRevitRealisticView( Dtk_bool );
44 
45  //! \brief Use to able/disable reading of Revit properties. By default, properties reading is enabled.
46  //! \param DTK_TRUE to read Revit properties or DTK_FALSE otherwise.
47  //! \warning please call it after Dtk_API initialization and before the Dtk_API::OpenDocument call.
48  //! \deprecated Metadata are now always retrieved..
49  SetAsDeprecated( "2025.4", "Metadata are now always retrieved." )
50  static void SetConfigRevitReadMetadata( Dtk_bool );
51 
52  //! \brief Use to able/disable reading of Revit 3d views. By default, view reading is enabled.
53  //! \param DTK_TRUE to read Revit views or DTK_FALSE otherwise.
54  //! \warning please call it after Dtk_API initialization and before the Dtk_API::OpenDocument call.
55  //! \deprecated Views are now always retrieved.
56  SetAsDeprecated( "2025.4", "Views are now always retrieved." )
57  static void SetConfigRevitReadViews( Dtk_bool );
58 
59  //! \brief Use to provide the same component organization as IFC or a flat one. By default, components are organized as in IFC.
60  //! \param DTK_TRUE to organize component as IFC (by Building, Level and element Category) or DTK_FALSE for flat organization.
61  //! \warning please call it after Dtk_API initialization and before the Dtk_API::OpenDocument call.
63 
64  //! \brief Use to retrieve only geometry corresponding to a specific level of detail. By default, level of detail retrieved is the one set in default view ({3D}) or "Detailed" if no default view exists.
65  //! \param The desired level of detail to be retrieved for geometry.
66  //! \warning If no geometry is assigned to the level of detail chosen, the Body/Mesh contained in the node converted will be empty.
68 
69  //! \brief Use to enables reading of Revit Linked Models, which file should be located in the same folder as the main project.
70  //! \param DTK_TRUE to enables the feature, DTK_FALSE to only process the main model.
72  //! [Options]
73 } ;
74 
75 #endif //#ifndef _DTK_REVIT_READER_HPP_
76 
RevitReader::SetConfigReadLinkedModel
static void SetConfigReadLinkedModel(Dtk_bool)
Use to enables reading of Revit Linked Models, which file should be located in the same folder as the...
Dtk_Reader
Definition: dtk_reader.hpp:15
Dtk_bool
char Dtk_bool
Definition: define.h:717
RevitReader::Enable
static Dtk_bool Enable()
RevitReader::SetConfigRevitOrderCompo
static void SetConfigRevitOrderCompo(Dtk_Int32)
Use to provide the same component organization as IFC or a flat one. By default, components are organ...
RevitReader
Definition: dtk_RevitReader.hpp:10
RevitReader::VisualStyle::Shaded
@ Shaded
RevitReader::SetConfigLevelOfDetail
static void SetConfigLevelOfDetail(LevelOfDetail)
Use to retrieve only geometry corresponding to a specific level of detail. By default,...
RevitReader::LevelOfDetail
LevelOfDetail
Definition: dtk_RevitReader.hpp:14
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:679
RevitReader::~RevitReader
virtual ~RevitReader()=0
RevitReader::SetAsDeprecated
SetAsDeprecated("2025.4", "Use SetConfigRevitVisualStyle( VisualStyle ) instead.") static void SetConfigRevitRealisticView(Dtk_bool)
Use to render as in revit "Realistic" and "Texture" visual style for views (with textures)....
define.h
RevitReader::LevelOfDetail::Detailed
@ Detailed
RevitReader::VisualStyle
VisualStyle
Definition: dtk_RevitReader.hpp:21
RevitReader::VisualStyle::Realistic
@ Realistic
RevitReader::LevelOfDetail::ReaderGuessed
@ ReaderGuessed
RevitReader::VisualStyle::ReaderGuessed
@ ReaderGuessed
dtk_reader.hpp
RevitReader::LevelOfDetail::Coarse
@ Coarse
RevitReader::VisualStyle::Textures
@ Textures
RevitReader::SetConfigRevitVisualStyle
static void SetConfigRevitVisualStyle(VisualStyle)
Determine which Revit visual style to use for convertion. The visual style determines which material ...
RevitReader::LevelOfDetail::Medium
@ Medium