ACAPI_​Element_​GetElemList

Returns an array of guids of the elements of the given type.

    GSErrCode  ACAPI_Element_GetElemList (
        API_ElemTypeID           typeID,
        GS::Array<API_Guid>*     elemList,
        API_ElemFilterFlags      filterBits = APIFilt_None,
        API_ElemVariationID      variationID = APIVarId_Generic
        const API_Guid&     renovationFilterGuid = APINULLGuid
    );

 

Parameters

typeID
[in] Element type identifier
elemList
[out] List of element Guids collected by the function
filterBits
[in] The flags used for filtering (see ACAPI_Element_Filter). The default value is APIFilt_None.
variationID
[in] Optional variation ID for objects. Used in combination with APIFilt_IsOfVariation. The default value is APIVarId_Generic.
renovationFilterGuid Featuring API 17
[in] Optional global unique identifier of the renovation filter. Used in combination with APIFilt_IsVisibleByRenovation. The default value is APINULLGuid.

 

Return Values

NoError
The function has completed with success.
APIERR_BADPARS
The elemList pointer is nullptr.

For other common API errors see the API Errors document.

 

Remarks

This function can be used to iterate through elements of the given type and variation, that match the criteria defined by filterbits (see the filterbits flag values described in the table of ACAPI_Element_Filter).

You may pass API_ZombieElemID as typeID in order to retrieve all the elements regardless of type.

 

Example


GS::Array<API_Guid> elemList;
ACAPI_Element_GetElemList (API_LineID, &elemList, APIFilt_OnActFloor);
DBPrintf ("number of lines on the active floor: %ld", elemList.GetSize ());

 

Requirements

Version: API 12 or later
Header: ACAPinc.h

 

See Also

ACAPI_Element_Filter, Element Manager, API Functions