ODA Product: | ODA PRC SDK |
Sample Name: | OdPrcToXml |
Categories: | C++ / Advanced / Working with .prc files / Android, iOS, macOS, Linux, Windows |
Source Code Location: | Prc/Examples/OdPrcToXml |
A console sample application that reads a .prc file and dumps its content to an .xml file.
To run the OdPrcToXml
sample application, please do the following:
<PRC_DIR>\exe\<version>
<PRC_DIR>/bin/<version>
<PRC_DIR>
is a directory where you unpacked the PRC SDK archive.
To determine your <version>
parameter, please see the
appropriate section
in the Download ODA PRC SDK topic.
OdPrcToXml <filename> <xml filename> [AUDIT]
filename
|
Full path to the input .prc file. |
xml filename
|
Full path to the output .xml file. It will contain all dumped content from the input .prc file. |
AUDIT
|
Optional parameter. If specified, enables audit functionality for the dumped input .prc file. |
If the application executed properly, you will see the following console window:
If an error occurs during the application execution, you will see an appropriate error message in the console window. For example, the following picture illustrates the program output in the case when it was called with wrong arguments:
The content of the specified .prc file is exported into an xml file determined with the xml filename
parameter:
Sample application source code is located in the OdPrcToXml.cpp file. This file contains the application entry point (main() function). The main() function also contains common sections before and after the source code section that illustrate how to dump a .prc file into an .xml file.
The following steps represent the dumping routine implemented in the sample application:
Note that the prcToXml() method of the OdPrcToXmlModule module accepts a set of parameters that are represented with bit flags (ControlFlags class).
Copyright © 2002 – 2020. Open Design Alliance. All rights reserved.
|