ODA IFC SDK Developer's Guide > Get Started with IFC SDK > Initialization and Deinitialization
Initialize and Deinitialize IFC SDK

As usual for ODA products, before starting to use IFC SDK functionality, you need to initialize it. To initialize IFC SDK, use the odIfcInitialize(); function which is declared in the Include/IfcCore.h header file. This function loads the appropriate modules that provide IFC SDK functionality. It accepts two parameters:

  • bInitIfcGeomResource — A flag that determines whether geometry functionality should be initialized as well. This flag is required for working with geometry objects.
  • modelerType — Determines which type of geometry is supported. By default, facet geometry is supported.

Before calling the odIfcInitialize(); function, sequentially call the odrxInitialize() function to get access to Rx-functionality and the odDbRootInitialize() function to initialize drawing database functionality:


odrxInitialize(&svcs);
odDbRootInitialize();

odIfcInitialize(true);
    

To clear up the environment before finishing an IFC SDK based application, call the odIfcUninitialize() function. If you called the odrxInitialize() and/or the odDbRootInitialize() function previously, don't forget to call the odrxUninitialize() and/or odDbRootUninitialize() functions. Note that you have to keep the calling sequence when de-initializing IFC functionality:


odIfcUninitialize();

odDbRootUninitialize();
odrxUninitialize();
    

See Also

Work with an IFC Database

Work with Header Sections and Models

Library Dependencies of IFC SDK

Download IFC SDK

Basic Concepts of IFC SDK Usage

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