Service alert: BIMcloud SaaS disruption in the US Read more

Archicad C++ API
About Archicad add-on development using the C++ API.

Dimensions of skin inside a wall

Nathan676
Participant

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;
		}
	}

}
0 REPLIES 0