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.

Projected Area and Legacy Settings

stefan
Advisor
When you collect the quantities of composite layers from Walls, using ACAPI_Element_GetSurfaceQuantities you can get the Projected Area/Exposed Surface from the API.

However, I noticed that if you have a project where the option "Use Legacy intersection and Surface methods for model elements" is enabled for your project, the exposed surface stays ZERO.

Is this a bug? Or a limitation? I did not read it in the documentation.
--- stefan boeykens --- bim-expert-architect-engineer-musician ---
Archicad28/Revit2024/Rhino8/Solibri/Zoom
MBP2023:14"M2MAX/Sequoia+Win11
Archicad-user since 1998
my Archicad Book
4 REPLIES 4
Akos Somorjai
Graphisoft
Graphisoft
stefan wrote:
When you collect the quantities of composite layers from Walls, using ACAPI_Element_GetSurfaceQuantities you can get the Projected Area/Exposed Surface from the API.

However, I noticed that if you have a project where the option "Use Legacy intersection and Surface methods for model elements" is enabled for your project, the exposed surface stays ZERO.

Is this a bug? Or a limitation? I did not read it in the documentation.
Hi Stefan,

The special 3D model we use to calculate the exposed areas cannot be created in legacy mode, so you'll always get 0 area.

Best, Akos
ReignBough
Enthusiast
How to use this ACAPI_Element_GetSurfaceQuantities? Not in documentation but based on its definition, it accepts list/array of GUID of elements and cover elements, and returns list of element surface quantities.

I have the following code (snippet):
td_GuidArr elemList;
td_GuidArr coverList;

//... other element types to be considered as "cover"
ACAPI_Element_GetElemList(API_ColumnID, &elemList);
coverList.Push(elemList);
elemList.Clear();
ACAPI_Element_GetElemList(API_WallID, &elemList);
// no need to clear since we'll get wall "exposed" surface area

GS::Array<API_ElemPartSurfaceQuantity> qs;
ACAPI_Element_GetSurfaceQuantities(&elemList, &coverList, &qs);
// print each element's exposed area
What I get is simply the whole surface area, and the covered areas are not deducted.

EDIT:
td_GuidArr = GS::Array<API_Guid>
~ReignBough~
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
ReignBough
Enthusiast
Here is a sample of a column "touching" a wall and the results of Scheme Settings and ACAPI_Element_GetSurfaceQuantities().

EDIT

BTW, this function is working fine if the elements intersect each other.
column touching wall.png
~ReignBough~
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
ReignBough
Enthusiast
Here's another problem on "Exposed Area" using API.
~ReignBough~
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS