ACAPI_​Element_​GetElemListByIFCIdentifier

Get elements having a certain IFC identifier

    GSErrCode  ACAPI_Element_GetElemListByIFCIdentifier (
        const API_Guid*          archicadIFCID,
        const API_Guid*          externalIFCID,
        GS::Array<API_Guid>&     elements
    );

 

Parameters

archicadIFCID 
[in] Archicad IFC ID – it can be nullptr
externalIFCID 
[in] External IFC ID – it can be nullptr
elements 
[out] GUID of the elements

 

Return Values

NoError
The function has completed with success.
APIERR_BADPARS
Both archicadIFCID and externalIFCID are nullptr or elements parameter is nullptr.
APIERR_MODULNOTINSTALLED
IFC add-on is not present.

For other common API errors see the API Errors document.

 

Remarks

This function searches for elements having the indicated IFC Guid.

  • only archicadIFCID contains value – it searches for an element having the indicated Archicad IFC ID. The elements can have maximum 1 element.
  • only externalIFCID contains value – it searches for elements having the indicated External IFC ID. The elements can have more then one element.
  • both archicadIFCID and externalIFCID contains value – it searches for an element having the indicated Archicad IFC ID and External IFC ID. The elements can have maximum 1 element.
  • both input parameters are nullptr – it returns APIERR_BADPARS.

Conversion from IFC Guid string (IfcGloballyUniqueId) to API_Guid can be done with APIAny_IFCGuidToAPIGuidID.

 

Requirements

Version: API 18 or later
Header: ACAPinc.h

 

See Also

ACAPI_Element_GetIFCIdentifier
APIAny_APIGuidToIFCGuidID
APIAny_IFCGuidToAPIGuidID