Close

Relief for ODA Team in Ukraine

Learn more
ODA Drawings SDK
Exporting a Drawing File to a .wmf File

Summary

ODA Product: Drawings SDK
Sample Name: OdWmfExport
Categories: 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:

  1. 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.
  2. Run the sample with appropriate arguments:
    OdWmfExport <input file> <output file> <file type> <xSize> <ySize> [<override background>]
input file 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:
  1. Set background as is (default value).
  2. Disable background, use palette as is.
  3. Draw light background.
  4. Disable background, use light palette.
  5. Draw dark background.
  6. 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.

See also:

Using the Sample Code

Copyright © 2002 – 2022. Open Design Alliance. All rights reserved.