Archicad 27 C++ API
|
Provides functions to create and handle element sets for any kind of purpose. You may also add custom information to the element set. More...
Functions | |
GSErrCode __ACENV_CALL | ACAPI_ElementSet_Create (GS::Array< API_Guid > *guids, const API_UserData *userData, API_Guid *setGuid) |
Groups elements into an element set. | |
GSErrCode __ACENV_CALL | ACAPI_ElementSet_Delete (API_Guid setGuid) |
Deletes an existing element set. | |
GSErrCode __ACENV_CALL | ACAPI_ElementSet_GetData (API_Guid setGuid, GS::Array< API_Guid > *elemGuids, API_UserData *data) |
Retrieves the data of an existing element set. | |
GSErrCode __ACENV_CALL | ACAPI_ElementSet_Identify (API_Guid elemGuid, GS::Array< API_Guid > *setGuids) |
Retrieves the element sets that contain a given element. | |
Provides functions to create and handle element sets for any kind of purpose. You may also add custom information to the element set.
The Element Set Manager lets your add-on mark a group of elements to be treated as a collection.
For example you have a building schedule database, and you want to assign elements to the tasks they are involved in. So you can create an element set for this task. Since an element can belong to more than one task, different element sets can contain the same element as well.
The elements in the set are referenced by their GUIDs. The Element Set Manager service automatically updates the GUID lists at merge or paste operations, when ID collision could happen.
You may also attach custom user data to an element set.
Note that from Archicad 12 element sets are referenced with their GUIDs rather than indices, because element sets can be re-indexed during the lifetime of a project, and that could have made difficult to follow up.
The Element Set Manager functions begin with the ACAPI_ElementSet_ prefix.
If you would like to store data into the project file that independent from the element database (that is it does not contain element unique ID references), you can use the ModulData Manager service.
GSErrCode __ACENV_CALL ACAPI_ElementSet_Create | ( | GS::Array< API_Guid > * | guids, |
const API_UserData * | userData, | ||
API_Guid * | setGuid | ||
) |
Groups elements into an element set.
guids | [in] Handle to the array of element GUIDs. |
userData | [in] User data assigned to the set (optional, can be nullptr). |
setGuid | [out] The unique ID of the newly created element set. |
GSErrCode __ACENV_CALL ACAPI_ElementSet_Delete | ( | API_Guid | setGuid | ) |
Deletes an existing element set.
setGuid | [in] The GUID of the element set to be deleted. |
GSErrCode __ACENV_CALL ACAPI_ElementSet_GetData | ( | API_Guid | setGuid, |
GS::Array< API_Guid > * | elemGuids, | ||
API_UserData * | data | ||
) |
Retrieves the data of an existing element set.
setGuid | [in] The GUID that identifies the element set. |
elemGuids | [out] Pointer to the array of element GUIDs. |
data | [out] User data assigned to the set. |
GSErrCode __ACENV_CALL ACAPI_ElementSet_Identify | ( | API_Guid | elemGuid, |
GS::Array< API_Guid > * | setGuids | ||
) |
Retrieves the element sets that contain a given element.
elemGuid | [in] The element GUID to search for, or GS::NULLGuid to get all element sets. |
setGuids | [out] Array of GUIDs of the element sets that contain the element. |