cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Archicad C++ API
About Archicad add-on development using the C++ API.

Dimensions of skin inside a wall

Nathan676
Contributor

I am trying to get the dimensions of a particular skin inside a wall I am able to get to the skin by the following code but the only dimensions I seem to have access to is projected area and volume, but I am wanting to pull height and length as well. Also I am on Archicad 24.

 

for (auto& guid : elements) {

	API_Element wallElement;
	BNZeroMemory(&wallElement, sizeof(wallElement));
	wallElement.header.guid = guid;
	GSErrCode err = ACAPI_Element_Get(&wallElement);

	API_QuantityPar params{};
	GS::Array<API_CompositeQuantity> comps;
	API_Quantities quants;
	API_ElementQuantity elemQuants{};
	quants.elements = &elemQuants;
	quants.composites = &comps;
	API_QuantitiesMask mask;
	ACAPI_ELEMENT_QUANTITIES_MASK_SETFULL(mask);
	auto error = ACAPI_Element_GetQuantities(guid, &params, &quants, &mask);
	if (error != NoError)
		continue;
	for (auto& comp : comps) {
		if (IsMaterialFrame(comp)) {
			comp.projectedArea;
			comp.volumes;
		}
	}

}
1 REPLY 1
Hiromichi Shinkawa
Graphisoft
Graphisoft

Hi, Does it make sense for you to get the skin thickness by using ACAPI_Attribute_get() function, then calulate the the length of the skin ?

(len = comp.projectedArea/skin thickness, height = comp.volumes/comp.projectedArea)

HTH.