cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

License delivery maintenance is planned for Saturday, July 26, between 12:00 and 20:00 CEST. During this time, you may experience outages or limited availability across our services, including BIMcloud SaaS, License Delivery, Graphisoft ID (for customer and company management), Graphisoft Store, and BIMx Web Viewer. More details…

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

[SOLVED] How to select an element by C++ code

Anonymous
Not applicable
My goal is to select an element by C++ code.

I have a modal dialog and I have elements GUIDs in current document, I want to select an element on dialog's button click.

Is there a way to do that ?

Thanks in advance!
3 REPLIES 3
ggiloyan wrote:
My goal is to select an element by C++ code.
Is there a way to do that ?
Yes, take a look at ACAPI_Element_Select.
Ralph Wessel BArch
Central Innovation
Anonymous
Not applicable
Thank you for the help! It works fine!
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
To make it clear, ACAPI_Element_Select is working with neig points of elements.
If you have element GUIDs it's not a problem, because you can convert it to neig points the following way:
- with the GUID get the element's header using ACAPI_Element_GetHeader
- use ElemHead_To_Neig function (can be found in APICommon.h in example AddOns) to convert the elemhead to neig