CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
OdIfc::Utils Namespace Reference

Functions

bool IFCCORE_EXPORT assignGlobalId (OdIfcInstance *inst)
 
OdDAIObjectIds IFCCORE_EXPORT getDefaultRepresentationContextsSelection (const OdIfcFile *pIfcFile, bool onlyBody=true)
 
OdDAIObjectIds IFCCORE_EXPORT getAllRepresentationContexts (const OdIfcFile *pIfcFile)
 
OdDAIObjectId IFCCORE_EXPORT getParentContainer (const OdDAI::ApplicationInstancePtr instance)
 
OdDAIObjectIds IFCCORE_EXPORT getSubItems (const OdDAI::ApplicationInstancePtr instance)
 
OdDAIObjectIds IFCCORE_EXPORT getSubItemsByType (const OdDAI::ApplicationInstancePtr instance, const OdAnsiString &subItemType)
 

Detailed Description

Contains declarations related to working with IFC files content.

Function Documentation

◆ assignGlobalId()

bool IFCCORE_EXPORT OdIfc::Utils::assignGlobalId ( OdIfcInstance * inst)

Assigns a generated global identifier to the "GlobalId" attribute of an entity derived from an IfcRoot object.

Parameters
pInst[in] A raw pointer to the IFC entity instance.
Returns
true if the attribute "GlobalId" was successfully assigned; otherwise the method returns false.

◆ getAllRepresentationContexts()

OdDAIObjectIds IFCCORE_EXPORT OdIfc::Utils::getAllRepresentationContexts ( const OdIfcFile * pIfcFile)

Retrieves identifiers (represented with the <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectIds.html>OdDAIObjectIds</exref> object) of all IfcGeometricRepresentationContext instances in a model of the specified IFC file. @param pIfcFile [in] A raw pointer to an <exref target="https://docs.opendesign.com/tifc_api_cpp/OdIfcFile.html>OdIfcFile</exref> object that keeps the IFC model.

Returns
An <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectIds.html>array of OdDAIObjectId</exref> instances, which contain identifiers that refer to geometric representation context objects; if nothing was selected, the method returns an empty array.

◆ getDefaultRepresentationContextsSelection()

OdDAIObjectIds IFCCORE_EXPORT OdIfc::Utils::getDefaultRepresentationContextsSelection ( const OdIfcFile * pIfcFile,
bool onlyBody = true )

Retrieves identifiers (represented with the <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectIds.html>OdDAIObjectIds</exref> object) of default IfcGeometricRepresentationContext instances, which are necessary to get the geometrical representation of a model of the specified IFC file. @param pIfcFile [in] A raw pointer to an <exref target="https://docs.opendesign.com/tifc_api_cpp/OdIfcFile.html>OdIfcFile</exref> object that keeps the IFC model.

Parameters
onlyBody[in] A flag that determines that only sub-contexts with the "Body" identifiers are selected (if it is equal to true).
Returns
An <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectIds.html>array of OdDAIObjectId</exref> instances, which contain identifiers that refer to geometric representation context objects; if nothing was selected, the method returns an empty array.
Remarks
Earlier IFC versions as IFC2X2 are supported by finding users of contexts.

◆ getParentContainer()

OdDAIObjectId IFCCORE_EXPORT OdIfc::Utils::getParentContainer ( const OdDAI::ApplicationInstancePtr instance)

Retrieves identifier of parent container for IfcElement.

Parameters
instance[in] A pointer to IFC entity instance.
Returns
The <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the parent entity or the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId__kNullHandle.html>kNullHandle</exref> kNullHandle> value otherwise.

◆ getSubItems()

OdDAIObjectIds IFCCORE_EXPORT OdIfc::Utils::getSubItems ( const OdDAI::ApplicationInstancePtr instance)

Retrieves subitems identifiers of current IfcElement based on decompose or connective relationship.

Parameters
instance[in] A pointer to IFC application instance.
Returns
OdDAIObjectIds, array of OdDAIObjectId instances, which contain subitems identifiers or empty array otherwise.

◆ getSubItemsByType()

OdDAIObjectIds IFCCORE_EXPORT OdIfc::Utils::getSubItemsByType ( const OdDAI::ApplicationInstancePtr instance,
const OdAnsiString & subItemType )

Retrieves subitems identifiers of current IfcElement on decompose or connective relationship with specified type.

Parameters
instance[in] A pointer to IFC application instance.
subItemType[in] OdAnsiString that contains subitem types to extract.
Returns
OdDAIObjectIds, array of OdDAIObjectId instances, which contain subitems identifiers or empty array otherwise.