Tuesday - last edited Tuesday
Can't get the two ids of the column element, only the GUID
Tuesday
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.
Tuesday
C++ API(add-ons)
Tuesday
Can't get the Element ID
Tuesday
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);
Tuesday
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();
Tuesday
I find that one element id in the column is GUID, what is the relationship between the other element id and Guid?
Tuesday
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.
Tuesday
My ultimate goal is to get the model information for columns, such as Polygon, Vertex. These cannot be obtained directly from the Guid.
Tuesday
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().