We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2024-10-01 10:21 AM - edited 2024-10-01 10:47 AM
Can't get the two ids of the column element, only the GUID
2024-10-01 10:35 AM
What 2 IDs - Element ID and GUID?
Where are you trying to get this information?
Autotext labels, GDL, API (add-ons), schedules?
Let me know and I will move this post to the appropriate forum.
Barry.
2024-10-01 10:38 AM
C++ API(add-ons)
2024-10-01 10:48 AM
Can't get the Element ID
2024-10-01 11:06 AM
Element ID's are specific properties.
Try something like this:
const API_Guid ELEMID_PROP_GUID = APIGuidFromString ("7E221F33-829B-4FBC-A670-E74DABCE6289");
API_Property prop;
GSErrCode err = ACAPI_Element_GetPropertyValue (elementGuid, ELEMID_PROP_GUID, prop);
if (err != NoError) { return err; }
ACAPI_WriteReport("Element ID: " + prop.value.singleVariant.variant.uniStringValue, true);
2024-10-01 11:24 AM
Thank you, I will try it, but now there is another problem. When adding a column in the scene, I will get two element, I don't know how to get ID separately.
ModelerAPI::Model* m_model;
Int32 nElements = m_model->GetElementCount();
2024-10-01 12:04 PM
I find that one element id in the column is GUID, what is the relationship between the other element id and Guid?
2024-10-01 04:02 PM
I haven't used the ModelerAPI yet, but I don't think it helps you in your case (if I understand correctly what you want to do).
Instead check out these two functions and their examples:
ACAPI_Element_Get
GUID is a unique identification number for each element. With Element ID I usually refer to the property which is usually something like "COL - 001".
And on top of that, the Element ID is a built-in property which has it's own GUID. That's also very confusing.
The question really is which information you want exactly. Maybe you can make a screenshot of the information as you see it in the Archicad Window, then we can tell you how to get it with the API.
2024-10-01 07:05 PM
My ultimate goal is to get the model information for columns, such as Polygon, Vertex. These cannot be obtained directly from the Guid.
2024-10-01 07:22 PM
I can only get one Guid for the column through ACAPI_Element_GetElemList.
With m_model->GetElementCount(), I find that the column consists of two elements, and then use GetElemGuid() to find that each of them has a different Guid.
I am currently using notification management ElementEventHandlerProc, when APINotifyElement_New, the column will return one Guid and the other Guid will not return, what is the way to get it?
I think it might not be an Element ID, but a column with two Guids, judging from the interface GetElemGuid().