Archicad 28 C++ API
|
Functions to create, delete and use groups and sets of different elements. More...
Classes | |
struct | API_UserData |
Custom data record attached to element sets. More... | |
Enumerations | |
enum | API_ToolCmdID { APITool_Group = 'GRUP' , APITool_Ungroup = 'UGRP' , APITool_SuspendGroups = 'SUSP' , APITool_Lock = 'LOCK' , APITool_Unlock = 'ULCK' , APITool_BringToFront = 'OFR0' , APITool_BringForward = 'OFR1' , APITool_SendBackward = 'OBA1' , APITool_SendToBack = 'OBA0' , APITool_ResetOrder = 'ORST' } |
It is used at the ACAPI_Grouping_Tool function. | |
Functions | |
GSErrCode | ACAPI_Grouping_ChangeSuspendGroup (bool suspendGroups) |
Set 'Suspend Groups' in Archicad. | |
GSErrCode | ACAPI_Grouping_GetMainGroupGuid (const API_Guid *groupGuid, API_Guid *mainGroupGuid) |
Returns the top level group of a nested group element. | |
GSErrCode | ACAPI_Grouping_GetConnectedElements (const API_Guid &guid, const API_ElemType &connectedElemType, GS::Array< API_Guid > *connectedElements, API_ElemFilterFlags filterBits=APIFilt_None, const API_Guid &renovationFilterGuid=APINULLGuid) |
Returns a list of elements connected to the given element. | |
GSErrCode | ACAPI_Grouping_Tool (const GS::Array< API_Guid > &elemGuids, API_ToolCmdID typeID, void *pars) |
Executes tool commands on elements. | |
GSErrCode | ACAPI_Grouping_CreateGroup (const GS::Array< API_Guid > &elemGuids, API_Guid *groupGuid=nullptr, const API_Guid *parentGroupGuid=nullptr) |
Create an element group. | |
GSErrCode | ACAPI_Grouping_GetGroup (const API_Guid &elemGuid, API_Guid *groupGuid) |
Returns the group unique ID of the given element. | |
GSErrCode | ACAPI_Grouping_GetRootGroup (const API_Guid &elemGuid, API_Guid *rootGroupGuid) |
Returns the top level group unique ID of a nested group element. | |
GSErrCode | ACAPI_Grouping_GetGroupedElems (const API_Guid &groupGuid, GS::Array< API_Guid > *elemGuids) |
Returns the immediate elements of the given group. | |
GSErrCode | ACAPI_Grouping_GetAllGroupedElems (const API_Guid &groupGuid, GS::Array< API_Guid > *elemGuids) |
Returns all elements of the given group. | |
GSErrCode | ACAPI_Grouping_GetUserData (const API_Guid &groupGuid, API_UserData *userData) |
Obtains the user data attached to an element group. | |
GSErrCode | ACAPI_Grouping_SetUserData (const API_Guid &groupGuid, const API_UserData *userData) |
Attaches the user data to the element group. | |
Functions to create, delete and use groups and sets of different elements.
GSErrCode ACAPI_Grouping_ChangeSuspendGroup | ( | bool | suspendGroups | ) |
Set 'Suspend Groups' in Archicad.
suspendGroups | [in] Suspend or unsuspend grouping in Archicad. |
GSErrCode ACAPI_Grouping_CreateGroup | ( | const GS::Array< API_Guid > & | elemGuids, |
API_Guid * | groupGuid = nullptr , |
||
const API_Guid * | parentGroupGuid = nullptr |
||
) |
Create an element group.
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). |
GSErrCode ACAPI_Grouping_GetAllGroupedElems | ( | const API_Guid & | groupGuid, |
GS::Array< API_Guid > * | elemGuids | ||
) |
Returns all elements of the given group.
groupGuid | [in] Unique ID of the passed group. |
elemGuids | [out] Array of all element unique IDs which below the passed group. |
GSErrCode ACAPI_Grouping_GetConnectedElements | ( | const API_Guid & | guid, |
const API_ElemType & | connectedElemType, | ||
GS::Array< API_Guid > * | connectedElements, | ||
API_ElemFilterFlags | filterBits = APIFilt_None , |
||
const API_Guid & | renovationFilterGuid = APINULLGuid |
||
) |
Returns a list of elements connected to the given element.
guid | [in] Identifier of the element having other elements connected to it. |
connectedElemType | [in] The type of the connected elements to be retrieved. Currently applicable types: API_WindowID , API_DoorID (with Wall elements), API_SkylightID (with Roof and Shell elements), API_LabelID (with all labelable elements, i.e. modeling elements, Curtain Wall subelements, and Fill elements), API_OpeningID |
connectedElements | [out] Guid list of the connected elements retrieved. |
filterBits | [in] The flags used for filtering (see ACAPI_Element_Filter). The default value is APIFilt_None . |
renovationFilterGuid | [in] Optional global unique identifier of the renovation filter. This parameter is currently ignored. |
Type of the owner element (specified with guid) | Connected element type (connectedElemTypeID) |
---|---|
API_WallID | API_WindowID , API_DoorID |
API_RoofID , API_ShellID | API_SkylightID |
All labelable elements | API_LabelID |
API_OpeningID | API_WallID , API_SlabID , API_MeshID , API_BeamID |
Returns the group unique ID of the given element.
elemGuid | [in] Unique ID of the element. |
groupGuid | [out] Unique ID of the group which contains the element. |
GSErrCode ACAPI_Grouping_GetGroupedElems | ( | const API_Guid & | groupGuid, |
GS::Array< API_Guid > * | elemGuids | ||
) |
Returns the immediate elements of the given group.
groupGuid | [in] Unique ID of the passed group. |
elemGuids | [out] List of element unique IDs which directly belong to the given group. |
Returns the top level group of a nested group element.
groupGuid | [in] The guid of a group element. |
mainGroupGuid | [out] The guid of the root group in the group hierarchy which contains the tested group. |
Returns the top level group unique ID of a nested group element.
elemGuid | [in] Unique ID of the element. |
rootGroupGuid | [out] Unique ID of the root group. |
GSErrCode ACAPI_Grouping_GetUserData | ( | const API_Guid & | groupGuid, |
API_UserData * | userData | ||
) |
Obtains the user data attached to an element group.
groupGuid | [in] Unique ID of the element group. |
userData | [in/out] Pointer to the new user data. |
GSErrCode ACAPI_Grouping_SetUserData | ( | const API_Guid & | groupGuid, |
const API_UserData * | userData | ||
) |
Attaches the user data to the element group.
groupGuid | [in] Unique ID of the element group. |
userData | [in] Pointer to the new user data. |
GSErrCode ACAPI_Grouping_Tool | ( | const GS::Array< API_Guid > & | elemGuids, |
API_ToolCmdID | typeID, | ||
void * | pars | ||
) |
Executes tool commands on elements.
elemGuids | [in] Array containing the GUIDs of the elements to work on. |
typeID | [in] Type of the tool command. The possible values are listed below. |
pars | Reserved for further use. |
API_ToolCmdID | Meaning |
---|---|
APITool_Group | Creates a new group with the passed elements. |
APITool_Ungroup | Ungroups the passed elements. |
APITool_SuspendGroups | Switches the Suspend Groups mode On/Off. |
APITool_Lock | Locks the passed elements. |
APITool_Unlock | Unlocks the passed elements. |
APITool_BringToFront | Brings the passed elements above all the other. |
APITool_BringForward | Moves forward the passed elements. |
APITool_SendBackward | Moves backward the passed elements. |
APITool_SendToBack | Sends behind the elements to be overlapped by all the other. |
APITool_ResetOrder | Resets the default drawing order of the passed elements. |