cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Ilse J
Graphisoft Partner
Graphisoft Partner

Archicad API QUESTION

Hi,

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
1 Solution

Accepted Solutions
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi Ilse,

I wrote you a short example code:
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!

Regards,
Tibor

Go to post

2 Replies 2
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi Ilse,

I wrote you a short example code:
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!

Regards,
Tibor
Ilse J
Graphisoft Partner
Graphisoft Partner
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,

Ilse

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!