C++ / Working with .dwg files / Android, iOS, macOS, Linux, Windows
Location:
<INSTALL_DIR>/Drawings/Examples/OdWmfExport
Description
OdWmfExport is a console application used for reading a .dwg or .dxf
file and saving it to a .wmf file (Windows only).
Run Sample Application
To run the OdWmfExport 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.
A full path to a drawing (.dwg or .dxf) file to read data from.
output file
A full path to a Windows meta file write data to.
file type
A type of Windows meta file to create:
WMF - Windows meta file.
EMF - Enhanced meta file.
xSize
Horizontal size of the output screen.
ySize
Vertical size of the output screen.
override background
A flag value which determines whether background is overridden:
Set background as is (default value).
Disable background, use palette as is.
Draw light background.
Disable background, use light palette.
Draw dark background.
Disable background, use dark palette.
If the application executed properly, you will see the source file loading
progress and a message, informing that the database conversion is finished.
In case you get the "usage" message, check the parameters.
An error message indicates problems with the source file.