Close

Relief for ODA Team in Ukraine

Learn more
ODA PRC SDK
Sample Application for PRC File Audit

Summary

ODA Product: ODA PRC SDK
Sample Name: OdPrcAudit
Categories: C++ / Advanced / Working with .prc files / Android, iOS, macOS, Linux, Windows
Source Code Location: Prc/Examples/OdPrcAudit

Description

A sample application that audits a .prc file.

Run Sample Application

To run the OdPrcAudit sample application, please do the following:

  1. Open the terminal window and go to the directory where the sample binary file is allocated:
    • For Windows® platforms: <PRC_DIR>\exe\<version>
    • For Non-Windows platforms: <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.

  2. Run the sample with appropriate parameters:
    
                OdPrcAudit <filename>
              
    filename Full path to a .prc file that should be audited.

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:

Additional Information

ODA PRC SDK audit functionality is not implemented yet. The audit public interface will be used for future implementation.

Sample application source code is located in the OdPrcAudit.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 audit a .prc file's content.

The general audit process includes these steps:

  1. Load a ODA PRC SDK module for .prc functionality support.
  2. Create an instance of the OdPrcAuditInfoImpl class. This class contains audit functionality.
  3. Create a drawing database for the .prc file.
  4. Read the .prc file's content into the created database and check for errors.
  5. If one or more errors are found, a report is generated that details information about each error.

See Also:

Audit of a .prc File
ODA PRC SDK Sample Applications
Copyright © 2002 – 2022. Open Design Alliance. All rights reserved.