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.

How To Get Wall Area (square meter=m2) from [Morph]

Anonymous
Not applicable
Please teach me that
How To Get Wall Area (square meter=m2) from [Morph].

Parameter or Property or Calcurate Method ?
Element or Element_Memo ?
1 REPLY 1
Anonymous
Not applicable
The contributor person himself.
Is it a correct answer with this?
API_ElementQuantity	quantity;
API_QuantitiesMask	mask;
API_Quantities		quantities;
API_QuantityPar		par;
char				buffer[256];
quantities.elements = &quantity;

//MORPH面積
BNZeroMemory(&quantity, sizeof(API_ElementQuantity));
ACAPI_ELEMENT_QUANTITY_MASK_SETFULL(mask);
GSErrCode err = ACAPI_Element_GetQuantities(elem.header.guid, nullptr, &quantities, &mask);
if (err == NoError) {
    //Wall Area ? (Square Meter)
    double d = quantity.morph.surface;
}
Learn and get certified!