The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Discussions about using GRAPHISOFT's tools (API DevKit) for independent software developers

Moderators: Barry Kelly, Karl Ottenstein, LaszloNagy, ejrolon, gkmethy, Tibor Lorántfy, MOREH Tamas, Akos Somorjai, Ed Brown, Mihály Palenik

User avatar
By poco2013
Is there any way to obtain the measured and calculated areas of Zones using the API. I can obtain the zone structure of 'API_Zone_Type' for each zone but it does not appear to contain a area parameter.

Need to compare zone areas to obtain FAR's and other factors and would prefer to do it within a "Add-on'. if someone could point me in the right direction?
User avatar
By Tibor Lorántfy
You can retrieve the calculated quantities of an element using ACAPI_Element_GetQuantities function.
This function returns the area of the given zone:
Code: Select all
double GetAreaOfZone (const API_Guid& zoneGuid)
	API_ElementQuantity	quantity = {};
	API_Quantities		quantities = {};
	API_QuantitiesMask	mask;


	quantities.elements = &quantity;
	ACAPI_Element_GetQuantities (zoneGuid, nullptr, &quantities, &mask);

User avatar
By poco2013
Worked perfectly - Completely missed this.