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
Ralph Wessel
Mentor
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
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

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!