The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

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

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

By Ilse J

I've got an question about the ARCHICAD API element Quantities.

In the API_WallQuantity you can choose:
- skinAThickness: Wall skin thickness on the reference line side
- skinBThickness: Wall skin thickness on the side opposite to the reference line

We need the thickness of the inside part( the load-bearing part/skin of the wall) to go further with...

But with the parameters above it really depends on where you reference line is in the wall...

So I was wondering if there is a parameter in the API that I can use that for example search for the building material of the inside skin and than give the thickness of that part. Or is there a general thickness I can link to that part of the wall...

I hope anyone has experience with this and can help us out.

thanks in advance!

Kind regards

Ilse J
Schermafbeelding 2018-07-26 om 12.23.27.png
Schermafbeelding 2018-07-26 om 12.23.27.png (13.03 KiB) Viewed 238 times
Hi Ilse,

I wrote you a short example code:
Code: Select all
API_Attribute composite;
BNZeroMemory (&composite, sizeof(API_Attribute));
composite.header.typeID = API_CompWallID;
composite.header.index  = element.wall.composite;

GSErrCode err = ACAPI_Attribute_Get (&composite);
if (err == NoError) {
	API_AttributeDefExt	compDefs;
	BNZeroMemory (&compDefs, sizeof (API_AttributeDefExt));

	err = ACAPI_Attribute_GetDefExt (API_CompWallID, composite.header.index, &compDefs);
	if (err == NoError) {
		// enumerate the parts
		for (short ii = 0; ii < composite.compWall.nComps; ++ii) {
			API_CWallComponent& part = (*compDefs.cwall_compItems)[ii];
			part.buildingMaterial;	/**< index of the building material */
			part.fillThick;			/**< absolute thickness of the component in m	*/
		// after you modified the thickness you can save it using ACAPI_Attribute_ModifyExt
	ACAPI_DisposeAttrDefsHdlsExt (&compDefs);
If you have any further questions, feel free to ask me!

By Ilse J
Dear Tibor,

Thank you very much! We are going to try this one and if I have further question, I will contact you, thank you!

With kind regards,