Reads any format that CAD Exchanger can import. More...
Public Member Functions | |
ModelData_ModelReader () | |
Constructor. | |
~ModelData_ModelReader () | |
Destructor. | |
bool | Read (const Base_UTF16String &theFilePath, ModelData_Model &theModel) |
Reads the file at the specified path into the specified model. | |
bool | Read (const Base_UTF16String &theFilePath, ModelData_BIMModel &theModel) |
Reads the file at the specified path into the specified BIM model. | |
void | SetReaderParameters (const Base_ReaderParameters &theParameters) |
Sets reader parameters. | |
void | SetProgressStatus (const Base_ProgressStatus &theProgressStatus) |
Sets the progress status for the reading process. | |
const Base_ProgressStatus & | ProgressStatus () const |
Returns the progress status for the reading process. | |
internal::ModelData_ModelReaderImpl * | Impl () |
Reads any format that CAD Exchanger can import.
Use this class to streamline the code where multiple formats have to be read in a uniform fashion. This reader handles the task of determining the suitable reader itself, the client code then receives the resulting ModelData_Model.
Each CAD Exchanger reader has its own binary. This class will load the binaries of readers at runtime for its operation. No linking is done at compile-time. If you're planning to omit some CAD Exchanger libraries from your software distribution, make sure to include the libraries for all the formats you intend to read.
bool cadex::ModelData_ModelReader::Read | ( | const Base_UTF16String & | theFileName, |
ModelData_BIMModel & | theBIMModel | ||
) |
Reads the file at the specified path into the specified BIM model.
Automatically selects a reader suitable for the specified file. The selection is performed from the readers that can be loaded at runtime. Returns true if the reading process succeeded, false otherwise.
BaseError_MissingFile | if the file can't be found at the specified path. |
BaseError_MissingModule | if no reader for the specified file could be found (either because the format is not supported by CAD Exchanger, or because a related module couldn't be loaded). |
LicenseManager_LicenseError | if the corresponding reader was found but there was no active license for it. |
bool cadex::ModelData_ModelReader::Read | ( | const Base_UTF16String & | theFileName, |
ModelData_Model & | theModel | ||
) |
Reads the file at the specified path into the specified model.
Automatically selects a reader suitable for the specified file. The selection is performed from the readers that can be loaded at runtime. Returns true if the reading process succeeded, false otherwise.
BaseError_MissingFile | if the file can't be found at the specified path. |
BaseError_MissingModule | if no reader for the specified file could be found (either because the format is not supported by CAD Exchanger, or because a related module couldn't be loaded). |
LicenseManager_LicenseError | if the corresponding reader was found but there was no active license for it. |
void cadex::ModelData_ModelReader::SetReaderParameters | ( | const Base_ReaderParameters & | theParameters | ) |
Sets reader parameters.
Any child of Base_ReaderParameters can be passed to this function and it will affect the reading of the corresponding format only. Call multiple times with parameter objects for different readers to customize the behavior of these readers.