ACAPI_​Element_​DeselectAll

Adds/removes a number of elements to/from the current selection.

    GSErrCode  ACAPI_Element_DeselectAll ();

 

Parameters

 

Return Values

NoError
The function has completed with success.
APIERR_BADDATABASE
The current database is not proper for the operation.

For other common API errors see the API Errors document.

 

Remarks

This function acts as “Deselect All”. Use ACAPI_Element_Select function to add/remove elements to/from the current selection.

 

Example


GSErrCode    Do_SelectAllWalls (void)
{
    ACAPI_Element_DeselectAll ();

    GS::Array<API_Guid> wallGuids;
    ACAPI_Element_GetElemList (API_WallID, &wallGuids);

    GS::Array<API_Neig> selNeigs;
    for (const API_Guid& guid : wallGuids) {
        API_Neig neig (guid);
        selNeigs.Push (neig);
        // Note: the following 1 commented line is equivalent to the previous 2 lines
        // selNeigs.PushNew (guid);
    }

    return ACAPI_Element_Select (selNeigs, true);
}

 

Requirements

Version: API 23 or later
Header: ACAPinc.h

 

See Also

ACAPI_Element_Select,
Selection Manager, API Functions