Developer's Guide > Get Started with Civil SDK > Using Sample Applications > TcReadEx Sample Application
TcReadEx Sample Application

Summary

ODA Product: Civil SDK
Sample Name: TcReadEx
Source Code Location: <INSTALL_DIR>/Civil/Examples/TcReadEx

Description

The TcReadEx sample application is the analog of the OdReadEx sample application with Civil modules loading. TcReadEx reads a drawing file and displays information about the entities and object types located in the file.

It illustrates:

  • Initialization of ODA services.
  • Creating a database and loading a drawing into it from file, including password-protected files.
  • Parsing of a loaded database.
  • Switching on entity/object types using protocol extensions.
  • Assert function customization.

Run Sample Application

To run the TcReadEx 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 Civil SDK archive.
    To determine your <PLATFORM_NAME> parameter, please see the ODA Platform Naming Conventions section in the Downloading Civil SDK topic.
  2. Run the sample with appropriate arguments:
    TcReadEx <filename> [MT] [DO] [DR] [PL] [DD]
filename Full path to a drawing file to read data from.
MT Enable data loading in a multi threading mode.
DO Disable the output of the progress meter.
DR Disable dimensions recomputing.
PL Enable partial loading.
DD Only loading data without dumping.

If the application executed properly, you will see information about the entities and object types located in the source file. In the "DD" mode only loading progress will be displayed. In case you get the "usage" message, check the parameters. An error message indicates problems with the source file.

See also:

Using Sample Applications

OdReadEx Sample Application

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