We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

[SOLVED] Zone Settings Materials Information

Anonymous
Not applicable
Hello,

I am trying to find the materials of a room (Zone) entered by the user through the RoomTool Settings -> Settings -> Floor, Wall, Ceiling & Roof Panel:

-Floor Covering
-Ceiling Covering
-Wall Covering
-Roof Covering

I do not find them in the Memo of the Zone, also it is not part of the IFC Attributes or Properties. Where are these values stored?

Thank you for the advice.
Best, M
3 REPLIES 3
Akos Somorjai
Graphisoft
Graphisoft
mar_kq wrote:
Hello,

I am trying to find the materials of a room (Zone) entered by the user through the RoomTool Settings -> Settings -> Floor, Wall, Ceiling & Roof Panel:

-Floor Covering
-Ceiling Covering
-Wall Covering
-Roof Covering

I do not find them in the Memo of the Zone, also it is not part of the IFC Attributes or Properties. Where are these values stored?

Thank you for the advice.
Best, M
Hi,

They should be in the memo.params, in parameters like iFloorCovering (or stFloorCovering for the textual representation).

Best, Akos
Anonymous
Not applicable
Hello Akos,

I have tried your suggestion but I dont find these Attributes:
Akos wrote:
They should be in the memo.params, in parameters like iFloorCovering (or stFloorCovering for the textual representation).
Here the way I retrieve the memo.params:
// GET MEMO ------------------------------------------------------------ //
	BNZeroMemory (&memo, sizeof (memo));
	if (err == NoError && element.header.hasMemo) 
	{
		err = ACAPI_Element_GetMemo (element.header.guid, &memo, APIMemoMask_AddPars);
		if (err != NoError) 
		{
			ErrorBeep ("ACAPI_Element_Get/Memo", err);
		}
	} 
    
	// GET ELEMENT PARAMETERS --------------------------------------------- //
	if (&memo.params != NULL || *memo.params != NULL)
	{
		GS::GSSize paramCount = BMGetHandleSize (reinterpret_cast<GSHandle> (*&memo.params)) / sizeof (API_AddParType);

		map<string, string> attributeMap = map<string, string>();	
		for (int p = 0; p < paramCount; p++)
		{
			string attrName = (*memo.params)

.name; ....

I also tried getting the Memo without the APIMemoMask_AddPars Filter. I get in total 555 Parameters for the Zone.

There seems to be some Material-related Parameters:
wall_mat, ceiling_mat, floor_f, but they have only a single letter as a string value.

It seems the attributes I am looking for are all in the RoomStamp and not in the Room itself. I see there is a StampGUID in the Element Information.

How do I retrieve this Stamp attributes?

Thanks, Mauricio
Anonymous
Not applicable
So I figured out what was going on:

I had previously retrieved the string values with the following code, which was truncating the string after the first character. Therefore I did not "see" the values I was looking for:
reinterpret_cast<char*>((*memo.params)

.value.uStr);

I replaced it with the following and now it works:
GS::UniString ((*memo.params)

.value.uStr).ToCStr();

Thanks