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.

Does ACAPI_Element_GetQuantities work in sections?

Miha Nahtigal
Advocate

I am trying to extract element's quantities with 

ACAPI_Element_GetQuantities() in section views.
 
When working from floor plans or 3d views everything works fine. Unfortunatelly not in sections. I get APIERR_BADDATABASE error. 
 
"Element" parameter is correct, is visible in debug/trace outputs (and it obiviously works in floorplans). I can see correct element's properties such as "element.slab.thickness"
 
The element was obtained using 
err = ACAPI_Selection_Get(&selectionInfo, &selNeigs, true);
...
...
...loop selNeighs
element.header.guid = neig.guid;
if (ACAPI_Element_Get(&element) == NoError) {
if (element.header.type.typeID == API_SectElemID) {
el.guid = element.sectElem.parentGuid;
} else {
el.guid = neig.guid;
}
}
 
What am I doing wrong here? Is there any other way?
BIMquants.comBETA - Quantities and Costs Estimation with Archicad AddOn :: rushing to publish a beta preview
2 REPLIES 2
Miha Nahtigal
Advocate

Anyone?

BIMquants.comBETA - Quantities and Costs Estimation with Archicad AddOn :: rushing to publish a beta preview

I know nothing about the API, but in Archicad itself, you can only get quantities from 3D elements in the 3D model and 2D elements in the floor plan.

 

Barry.

 

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Learn and get certified!