BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

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

get element index

WalterWhite
Participant

I want to use the "API_Elem_Head" to get the "API_ElemInfo3D" with the function "ACAPI_Element_Get3DInfo()".

However, the "API_ElemInfo3D" i get has a zero value both of "fElemIdx" and "lElemIdx".

 

Here's my code:

GSErrCode __ACENV_CALL d5c_sync::ElementEventHandlerProc(const API_NotifyElementType * elem_type)
{
API_ElemInfo3D elem_info;
ACAPI_Element_Get3DInfo(elem_type->elemHead, &elem_info);

}

 

Is there some way i can get the element's index.I need it to get the element so i can read the geometry data by "ModelerAPI".

Thanks a lot!

1 REPLY 1
WalterWhite
Participant

Besides, I found that iI can get the element's Guid,so is there some way that I can get the element by Guid?

Learn and get certified!