ACAPI_​Element_​GetElemList

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

    GSErrCode  ACAPI_Element_GetElemList (
        const API_ElemType&      type,
        GS::Array<API_Guid>*     elemList,
        API_ElemFilterFlags      filterBits = APIFilt_None,
        const API_Guid&          renovationFilterGuid = APINULLGuid
    );

 

Parameters

type
[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.
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 type in order to retrieve all the elements regardless of type.

The variationID member in type is used in combination with APIFilt_IsOfVariation

New in API 26 From version 26 the typeID and variationID parameters were merged into a single API_ElemType parameter.

 

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