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

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

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

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?
BIMquants.comBETA - Quantities and Costs Estimation with Live Archicad Link
1 ACCEPTED SOLUTION

Accepted Solutions
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

 

View solution in original post

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

Great. Thank you.

BIMquants.comBETA - Quantities and Costs Estimation with Live Archicad Link