We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2024-01-15 02:42 AM - last edited on 2024-09-16 02:44 PM by Doreena Deng
Hello,
I am working with the Archicad API and facing an issue while trying to retrieve label information for door elements. Specifically, I am looking to access the GUID or other identifying properties of door labels.
I have successfully managed to obtain information related to door markers, including their GUIDs, using the following approach:
else if (elemType == API_DoorID) {
// Handle Door elements
API_DoorType& door = element.door;
// Access markGuid from openingBase
GS::Guid markGuid = APIGuid2GSGuid(door.openingBase.markGuid);
std::string markGuidStr = (const char*)markGuid.ToUniString().ToCStr().Get();
sprintf(reportStr, "Door Element, GUID: %s, Marker GUID: %s", APIGuidToString(elementGuid).ToCStr().Get(), markGuidStr.c_str());
However, when it comes to door labels, I am not sure how to access their properties. My current understanding is that door labels might be handled differently from door markers in the Archicad API, but I am unclear on the specifics.
My question is: How can I retrieve the label information, particularly the GUID, for door elements using the Archicad API? Are there specific functions or methods provided in the API for accessing door label properties?
Any guidance, code snippets, or references to relevant API documentation would be extremely helpful.
Thank you for your assistance.
Solved! Go to Solution.
2024-01-15 08:02 AM
The ACAPI_Grouping_GetConnectedElements function can get the associated labels for an element. You can also see an example usage in the Element_Test Add-On: look for the function UpdateAllLabels.
2024-01-15 08:02 AM
The ACAPI_Grouping_GetConnectedElements function can get the associated labels for an element. You can also see an example usage in the Element_Test Add-On: look for the function UpdateAllLabels.
2024-01-18 08:23 PM
@kovacsv Thank you very much, that was so helpful.