ODA IFC SDK Developer's Guide > Get Started with IFC SDK > Usage of IFC SDK Sample Applications > A Sample of a .ifc File Generation
Sample of IFC File Generation

Summary

ODA Product: IFC SDK
Sample Name: ExIfcFileGenerator
Categories: C++ / Beginner / Dumping IFC Files / Linux, macOS, Windows
Source Code Location: Ifc/Examples/ExIfcFileGenerator

Description

The ExIfcFileGenerator example is a sample application that creates a new .ifc file and fills it with content according to a specified executed scenario.

Run Sample Application

To run the ExIfcFileGenerator sample application:

  1. Open the terminal window and go to the directory where the sample binary file is located:
    • For Microsoft® Windows® platforms: <IFC_DIR>\exe\<version>
    • For non-Windows platforms: <IFC_DIR>/bin/<version>

    <IFC_DIR> is the directory where you unpacked the IFC SDK archive.

    To determine your <version> parameter, please see the appropriate section in the Download IFC SDK topic.

  2. Run the sample with the appropriate parameters:
    
                ExIfcFileGenerator <parameters>
              
     ††††ਠ†††††䠀e潴⹲瑨汭

    The example supports several sets of input parameters:

    
    ExIfcFileGenerator GET_SCENARIO_NAMES
                    
    Prints all available scenarios.
    
    ExIfcFileGenerator <number> <filename>
                    
    Runs a specified scenario one time.
    number — the index of the scenario to run.
    filename — the name of the output file.
    
    ExIfcFileGenerator <name> <filename>
                    
    Runs a specified scenario one time.
    name — the name of the scenario to run.
    filename — the name of the output file.
    
    ExIfcFileGenerator ALL <path>
                    
    Runs all available scenarios.
    path — the full path to a folder where the output .ifc files should be written.

The picture above shows the application output when it runs correctly.

The picture below illustrates an example of the console output when the application runs incorrectly (for example, without specifying input parameters):

See Also

Usage of IFC SDK Sample Applications
Copyright © 2002 – 2020. Open Design Alliance. All rights reserved.