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

The guid of selected object in section differs from guid of selected object in floorplan or in 3d

Miha Nahtigal
Advocate
Why does the ACAPI_Selection_Get() returns different guid in section than in floorplan?
It there a way to get the "original" guid of selected object in section view?
1 ACCEPTED SOLUTION
2 REPLIES 2
Solution
Viktor Kovacs
Graphisoft
Graphisoft

On sections there is a special element type called API_SectElemType. This is the section representation of an elem. You can get the original elem guid by accessing the parameters of the section element. Something like this:

API_Element element = {};
element.header.guid = sectionElementGuid;
ACAPI_Element_Get (&element);
APIGuid originalElemGuid = element.sectElem.parentGuid;
// now the originalElemGuid contains the real element guid

 

Miha Nahtigal
Advocate

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!