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

[SOLVED] Full & Compact Element ID in Zone

Anonymous
Not applicable
Where is this "Compact Element ID" information stored?

In Archicad it is found in a Zone Settings under Categories and Settings -> ID & Categories.

In the same group I see the following data (im using the CHE Version):
Element Classification: Room
ID-Nr. : XXX (This is the Information I want)
Renovation-Status (Umbau-Status): XXXX
Display in Renovation-Filter (Anzeigen auf Umbau-Filter): XXX

I have looked at the documentation for: API_​ElemCategoryID, when I use the suggested code* I get the following 6 key value pairs:

+("Anzeigen auf Umbau-Filter", "Alle relevanten Filter") -> API_ElemCategory_RenovationFilter
+("Element-Klassifizierung", "Raum") -> API_ElemCategory_ElementClassification
+("Klassifizierung nach DIN 277", "") -> API_ElemCategory_BRI:APIERR_BADPARS
+("Lage", "") -> API_ElemCategory_Position: APIERR_BADPARS
+("Tragende Funktion", "") -> API_ElemCategory_StructuralFunction
+("Umbau-Status", "Bestand") -> API_ElemCategory_RenovationStatus

I am getting an APIERR_BADPARS on two of them. Is the API_ElemCategory_BRI supposed to be the Compact Element ID?
Why am I getting the error?

*link to the code: http://archicadapi.graphisoft.com/documentation/acapi_element_getcategoryvalue?s=API_ElemCategory_BR...

ID.PNG
3 REPLIES 3
dfintha
Graphisoft Alumni
Graphisoft Alumni
Dear mar_kq,

The ID you are looking for is in the elemInfoString member of the API_ElementMemo structure correlating to your element.
To query the contents of this memo, you can use the ACAPI_Element_GetMemo function.

Best regards,
Dénes
Anonymous
Not applicable
dfintha wrote:
The ID you are looking for is in the elemInfoString member of the API_ElementMemo structure correlating to your element.
Thanks so much Denes, this worked.
ReignBough
Enthusiast
For 19 above, you can use ACAPI_Database(APIDb_GetElementInfoStringID, guid, infoStr).

For full (hotlinked id+element id) id, you can use ACAPI_Database(APIDb_GetCompoundInfoStringID, guid, infoStr).
~ReignBough~
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS