APIIFCRelationshipDataProc

User supplied callback procedure for helping BCF Import.

    typedef GSErrCode  APIIFCRelationshipDataProc (
        GS::HashTable<API_Guid, API_IFCRelationshipData>*	ifcRelationshipDataTable,
        const void*						par1
    );

 

Parameters

ifcRelationshipDataTable
[out] Gives back a Hashtable where the keys are the IFCProject’s GlobalIds and the values are their API_IFCRelationshipData.
par1
[in] Optional parameter.

 

Return Values

NoError
The function has completed with success.
APIERR_GENERAL
Any user-defined error can be returned.

For other common errors see the list of error codes.

 

Remarks

API_IFCRelationshipData may be needed by BCF topics when they refer to such components which are represented by their parent elements in Archicad.

A typical example is when an Archicad Wall is exported in IFC as an IFCWall instance having several IFCBuildingElementPart components and the imported BCF topic refers to a certain IFCBuildingElementPart.

In this case the BCF importer should convert the IFCBuildingElementPart reference to its parent (IFCWall) and connect its corresponding Archicad Wall element to the created MarkUp Entry.

In code it looks like the following:


API_IFCRelationshipData ifcRelationshipData;
ifcRelationshipData.containmentTable.Add (ifcBuildingElementPartGuid1, ifcWallGuid);
ifcRelationshipData.containmentTable.Add (ifcBuildingElementPartGuid2, ifcWallGuid);
ifcRelationshipData.containmentTable.Add (ifcBuildingElementPartGuid3, ifcWallGuid);

ifcRelationshipDataTable->Add (ifcProjectGuid, ifcRelationshipData);

If the origin of the model is the current Archicad project, then we can get the API_IFCRelationshipData which can be generated with APIAny_GetIFCRelationshipDataID. The ifcRelationshipDataTable can have several API_IFCRelationshipData of several IFCProjects. This is because the components of a BCF topic can refer several components which may be located under different IFCProjects.

For use see ACAPI_MarkUp_ImportFromBCF.

 

Example

For detailed examples, please see the MarkUp_Manager add-on.

 

Requirements

Version: API 23 or later
Header: APIdefs_Callback.h

 

See Also

API Functions