We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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 in Archicad - BETA testers needed.
2 REPLIES 2
Miha Nahtigal
Advocate

Anyone?

BIMquants.comBETA - Quantities and Costs Estimation in Archicad - BETA testers needed.

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
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11