ACAPI_​Element_​Get3DInfo

Retrieves information on the 3D data of an element.

    GSErrCode  ACAPI_Element_Get3DInfo (
        const API_Elem_Head&     elemHead,
        API_ElemInfo3D*          info3D
    );

 

Parameters

elemHead
[in] The element to get the 3D information for.
info3D
[out] The 3D information to be retrieved.

 

Return Values

NoError
The operation was successful.
APIERR_BADID
Incorrect elemHead.guid was specified. Incorrect type was specified, for example 0 or an element without 3D representation. such as API_LineID.
APIERR_BADPARS
The info3D parameter was nullptr.
APIERR_NOTMINE
The element was attempted to be accessed on a layer owned by someone else. Most likely to occur when working on documents in teamwork mode.
APIERR_LOCKEDLAY
The element was attempted to be accessed on a locked layer.
APIERR_HIDDENLAY
The element was attempted to be accessed on a hidden layer.
APIERR_GENERAL
The element wasn’t found in the 3D database. 

For other common API errors see the API Errors document.

 

Remarks

This function returns information on the 3D data of the element defined by elemHead. This function is defined only for those elements which have 3D representation: API_WallID, API_ColumnID, API_BeamID, API_WindowID, API_DoorID, API_ObjectID, API_LampID, API_SlabID, API_RoofID, and API_RoomID. The returned structure contains the first and last body (or, in case of API_LampID, the first and last light also) indices of the element’s 3D data. This index is an index to the whole 3D data structure, where all the 3D data is stored in a continuous way.

The 3D data of the element doesn’t need to exist; Archicad will convert the element to 3D independently of any existing 3D window data. This also means that the 3D representation doesn’t contain perspective cuts and 3D cut planes!

Currently, this is the only way to obtain information on holes in walls. Look for polygons which have a horizontal normal vector perpendicular to the reference line of the wall. Similarly, you can get information on the intersection of walls by looking for polygons with a vertical normal vector.

You can find more information on the 3D data in the 3D Manager and at the API_ElemInfo3D page of this help. You have to be familiar with the primitive element section of the GDL Reference Manual.

  

Requirements

Version: API 1.3 or later
Header: ACAPinc.h

 

See Also

API_ElemTypeID, API_ElemInfo3D,
Element Manager, 3D Manager, API Functions