To proceed with any operation for an IFC model, you need a smart pointer to its object within an IFC database.
To get it, use a model provider object from the OdDAI interface:
OdDAI::Utils::ModelProviderRO modelProvider(pDb->getRepository());
OdIfc::OdIfcModelPtr model = modelProvider.model<OdIfc::OdIfcModel>();
if (model.isNull() || model->underlyingSchemaName().find("IFC2X3") != 0)
{
ODA_ASSERT(0 && "Model is not valid.");
throw OdError(eNullEntityPointer);
}
Using the smart pointer returned by the model() method of the repository object, you can work with the IFC model using the OdDAI interface.