APIAny_​GetHierarchicalElementOwnerID

Returns the owner of the child elem in hierarchical elem.

    GSErrCode ACAPI_Goodies (
        APIAny_GetHierarchicalElementOwnerID,
        const API_Guid*    elemApiGuid,
        const API_HierarchicalOwnerType*       hierarchicalOwnerType,
        API_HierarchicalElemType*       hierarchicalElemType,
        API_Guid*    ownerElemApiGuid
    );

 

Parameters

elemApiGuid
[in] The guid of the element.
hierarchicalOwnerType
[in]

API_HierarchicalOwnerType

Meaning

API_RootHierarchicalOwner

Owner means the root of the hierarchical tree, so the function will return the main element of the hierarchical element.

API_ParentHierarchicalOwner

Owner means parent relationship in the hierarchical tree, so it’s possible that the returned owner element is also a child.

hierarchicalElemType
[out]

API_HierarchicalElemType

Meaning

API_MainElemInMultipleElem

The element is the main element of the hierarchical element. eg. Curtain Wall, Stair, Railing

API_ChildElemInMultipleElem

The element is a child element in the hierarchical element. eg. Curtain Wall Frame, Tread, …

API_SingleElem

This element isn’t part of a hierarchical element. eg. Wall, Slab, …

API_UnknownElemType

Occurs in case of error.

ownerElemApiGuid
[out] The input element or the owner element of the hierarchical element if the input element is a child element of a hierarchical element.

 

Return Values

NoError
The operation was successful.
APIERR_BADPARS
Some of the parameters are nullptr.

For other common API errors see the API Errors document.

 

Requirements

Version: API 23 or later
Header: APIdefs_Goodies.h

 

See Also

ACAPI_Goodies, API Functions