Close

Relief for ODA Team in Ukraine

Learn more
ODA Drawings SDK
Sample Console Application for Working with .dwg and .dgn Files

Summary

ODA Product: Drawings SDK
Sample Name: ExDgnDwgProject
Categories: C++ / Beginner / Working with .dwg files, Working with .dgn files / Android, iOS, macOS, Linux, Windows, WinCE, WinRT
Location: <INSTALL_DIR>/Dgn/Examples/ExDgnDwgProject

Note: <INSTALL_DIR> is a directory where you unpacked the Drawings SDK archive.

Description

A simple console application that illustrates working with .dwg and .dgn files. It creates a new .dwg and a new .dgn file and fills them with some objects.

Run Sample Application

To run the ExDgnDwgProject 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:
    ExDgnDwgProject <destination file>
destination file Full path to destination files with file name. Please note, that the extension of the destination file should not be specified. Two files with the same name are created: one with the .dwg extension and another with the .dgn extension.

If the application executed properly, you will see the progress of the .dgn file saving process, database conversion process and the .dwg file saving process. In case you get the "usage" message, check the parameters.

See also:

Using the Sample Code

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