C++ / Beginner Developer / Working with .dwg files / Android, iOS, macOS, Linux, Windows
Location:
<INSTALL_DIR>/Drawing/Examples/OdReadEx
Description
OdReadEx reads a drawing file and displays all information about the entities and object types located in the file.
It illustrates:
Drawings SDK initialization.
File loading, including password-protected files.
Parsing of a loaded database.
Switching on entity/object types using protocol extensions.
Accessing various object properties.
Getting entity geometry via vectorization.
Assert function customization.
Run Sample Application
To run the OdReadEx sample application, please do the following:
Open the terminal and go to the directory where the sample binary file is
built:
For Windows:
<INSTALL_DIR>\exe\<PLATFORM_NAME>\
For Non-Windows OS:
<INSTALL_DIR>/bin/<PLATFORM_NAME>/
<INSTALL_DIR> is a directory where you unpacked the
Drawings SDK archive.
To determine your <PLATFORM_NAME> parameter, please see
the ODA Platform Naming Conventions section in the
Downloading Drawings SDK topic.
Run the sample with appropriate arguments:
OdReadEx <filename> [MT] [DO] [DR] [PL] [DD]
filename
A full path to a drawing file to read data from.
MT
A loading data in multi threading mode.
DO
Disable the output of the progress meter.
DR
Disable dimensions recomputing.
PL
Enable partial loading.
DD
Only loading data without dumping.
If the application executed properly, you will see the source file loading
progress and a database dump, that includes all information about the entities
and object types located in the file.
In case you get the "usage" message, check the parameters.
An error message indicates problems with the source file.