ACAPI_​ElementGroup_​Create

Create an element group.

    GSErrCode  ACAPI_ElementGroup_Create (
        const GS::Array<API_Guid>&    elemGuids,
        API_Guid*                     groupGuid = nullptr,
        const API_Guid*               parentGroupGuid = nullptr
    );

 

Parameters

elemGuids 
[in] Array of unique IDs of the elements to group.
groupGuid 
[out] Unique ID of the newly created group.
parentGroupGuid 
[in] Optional parameter for setting unique ID of the parent group of the newly created group (making a group tree with it).

 

Return Values

NoError
The function has completed with success, a new element group has created.
APIERR_NEEDSUNDOSCOPE
The function must be undoable, it wasn’t called from an undoable command scope.
APIERR_BADID
One or more of the passed IDs are invalid.
APIERR_BADPARS
Invalid value passed in the parameters (nullptr pointer, empty ID list, etc.).

For other common API errors see the API Errors document.

 

Remarks

This function create a simple element group, it becomes only a container of some elements. Passed elements have to be on the same floor.

 

 

Requirements

Version: API 18 or later
Header: ACAPinc.h

 

See Also

ACAPI_ElementGroup_SetUserData
ACAPI_ElementGroup_GetUserData
ACAPI_ElementGroup_GetGroup
ACAPI_ElementGroup_GetRootGroup
ACAPI_ElementGroup_GetGroupedElems
ACAPI_ElementGroup_GetAllGroupedElems
API Functions