Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

Retrieving Door Label Information in Archicad API

sercet65
Booster

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Solution
kovacsv
Booster

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.

View solution in original post

2 REPLIES 2
Solution
kovacsv
Booster

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.

sercet65
Booster

@kovacsv Thank you very much, that was so helpful.