<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Door - Relation Parameters / Properties in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Door-Relation-Parameters-Properties/m-p/253830#M5108</link>
    <description>Hello Regina: &lt;BR /&gt;
&lt;BR /&gt;
I was hoping to get some clues as to the best approach for getting Door Label/Stamp Attributes with the API. &lt;BR /&gt;
&lt;BR /&gt;
You had provided very useful information before:&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;Regina wrote:&lt;BR /&gt;Hi,&lt;BR /&gt;
&lt;BR /&gt;
 The name of the parameter which describes the hinge side is "ac_openingSide".&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Regina&lt;/BLOCKQUOTE&gt;

The infos I am trying to get are in the picture (Doorstamp-&amp;gt;Settings-&amp;gt;Content3-&amp;gt;...):&lt;BR /&gt;
&lt;A href="https://drive.google.com/file/d/1CJJ4gqQRDYQHdMMkrW-O3u-rf41lVMNz/view" target="_blank"&gt;&lt;/A&gt;&lt;S&gt;&lt;A href="https://drive.google.com/file/d/1CJJ4gqQRDYQHdMMkrW-O3u-rf41lVMNz/view" target="_blank"&gt;&lt;/A&gt;&lt;A href="https://drive.google.com/file/d/1CJJ4gqQRDYQHdMMkrW-O3u-rf41lVMNz/view" target="_blank"&gt;&lt;/A&gt;&lt;/S&gt;&lt;LINK_TEXT text="https://drive.google.com/file/d/1CJJ4gq ... lVMNz/view"&gt;https://drive.google.com/file/d/1CJJ4gqQRDYQHdMMkrW-O3u-rf41lVMNz/view&lt;/LINK_TEXT&gt;&lt;E&gt;&lt;/E&gt;&lt;BR /&gt;
 &lt;BR /&gt;
It is not clear to me wether these informations should be within the door object/libpart or in the stamp/label itself. &lt;BR /&gt;
&lt;BR /&gt;
My guess is that they are actually stored in the stamp/label settings. I do not know however how to get a handle to this from the door. &lt;BR /&gt;
&lt;BR /&gt;
Any suggestions would be appreciated.</description>
    <pubDate>Tue, 12 Dec 2017 09:25:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-12-12T09:25:09Z</dc:date>
    <item>
      <title>Door - Relation Parameters / Properties</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Door-Relation-Parameters-Properties/m-p/253826#M5104</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;I am looking for the following &lt;STRONG&gt;door&lt;/STRONG&gt; informations in a Model:&lt;BR /&gt;&lt;BR /&gt;- Hinge side&lt;BR /&gt;- Wall structure (composition)&lt;BR /&gt;- Wall thickness&lt;BR /&gt;- Room number&lt;BR /&gt;- Room name&lt;BR /&gt;- from-Room name&lt;BR /&gt;- from-Room number/id&lt;BR /&gt;&lt;BR /&gt;I have been looking for the attributes in the &lt;STRONG&gt;params&lt;/STRONG&gt; and &lt;STRONG&gt;IFCProperties&lt;/STRONG&gt; but I have not found them yet. Is there a way to get this data as attributes directly from the API? &lt;BR /&gt;&lt;BR /&gt;Or is it something that must be done with the API_DoorRelation?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Jul 2023 18:56:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Door-Relation-Parameters-Properties/m-p/253826#M5104</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-12T18:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Door - Relation Parameters / Properties</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Door-Relation-Parameters-Properties/m-p/253827#M5105</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
With the help of the API_DoorRelation you can obtain the API_Guid of the rooms that are connected to the door, and from the element info of the door you can get the owner wall's API_Guid. From the API_Guids you can get the room (zone) names, number and the wall's composite and thickness. The name of the parameter which describes the hinge side is "ac_openingSide".&lt;BR /&gt;
&lt;BR /&gt;
For example if you want to know the information of the door you clicked on:&lt;BR /&gt;

&lt;PRE&gt;void		ClickedDoorInfo (void)
{
	API_Element			element;
	API_DoorRelation	doorInfo;

	BNZeroMemory (&amp;amp;element, sizeof (API_Element));

	if (!ClickAnElem ("Click a door", API_DoorID, nullptr, &amp;amp;element.header.typeID, &amp;amp;element.header.guid)) {
		WriteReport_Alert ("No door was clicked");
		return;
	}

	GSErrCode err = ACAPI_Element_Get (&amp;amp;element);
	if (err != NoError) {
		ErrorBeep ("ACAPI_Element_Get (door)", err);
		return;
	}

	err = ACAPI_Element_GetRelations (element.header.guid, API_ZombieElemID, &amp;amp;doorInfo);
	if (err != NoError) {
		ErrorBeep ("ACAPI_Element_GetRelations (door, all data)", err);
		return;
	}

	API_Element		wallElement, fromRoomElement, toRoomElement;

	// Get the information about the owner wall -----------------------
	WriteReport ("Owner wall: %s", APIGuidToString (element.door.owner).ToCStr ().Get ());
	wallElement.header.guid = element.door.owner;
	if (ACAPI_Element_Get (&amp;amp;wallElement) == NoError) { 
		WriteReport ("  wall  composite: %d", wallElement.wall.composite);
		WriteReport ("  wall  thickness at the beginning: %f", wallElement.wall.thickness);
		WriteReport ("  wall  thickness at the end: %f", wallElement.wall.thickness1);
	}

	// Get the information about the rooms -----------------------
	WriteReport ("Connected rooms:");
	WriteReport ("  fromRoom: %s", APIGuidToString (doorInfo.fromRoom).ToCStr ().Get ());
	WriteReport ("  toRoom  : %s", APIGuidToString (doorInfo.toRoom).ToCStr ().Get ());

	fromRoomElement.header.guid = doorInfo.fromRoom;
	toRoomElement.header.guid = doorInfo.toRoom;

	if (ACAPI_Element_Get (&amp;amp;fromRoomElement) == NoError) {
		WriteReport ("  fromRoom  name: %s", GS::UniString (fromRoomElement.zone.roomName).ToCStr ().Get ());
		WriteReport ("  fromRoom  number: %s", GS::UniString (fromRoomElement.zone.roomNoStr ).ToCStr ().Get ());
	}

	if (ACAPI_Element_Get (&amp;amp;toRoomElement) == NoError) {
		WriteReport ("  toRoom  name: %s", GS::UniString (toRoomElement.zone.roomName).ToCStr ().Get ());
		WriteReport ("  toRoom  number: %s", GS::UniString (toRoomElement.zone.roomNoStr ).ToCStr ().Get ());
	}

	// Get the value of the ac_openingSide parameter -----------------------
	API_ElementMemo     memo;

	if (ACAPI_Element_GetMemo (element.header.guid, &amp;amp;memo) == NoError) {
		API_AddParType	**params = memo.params;
		Int32	n = BMGetHandleSize ((GSHandle) params) / sizeof (API_AddParType);

		for (int i = 0; i &amp;lt; n; i++) {
			if (CHEqualASCII ((*params)&lt;I&gt;.name, "ac_openingSide", CS_CaseInsensitive)) {
				WriteReport ("ac_openingSide: %s", (*params)&lt;I&gt;.value.uStr);
				break;
			}
		}

		ACAPI_DisposeElemMemoHdls (&amp;amp;memo);
	}

	return;
}
&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

Regards,&lt;BR /&gt;
Regina</description>
      <pubDate>Thu, 05 Jan 2017 16:40:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Door-Relation-Parameters-Properties/m-p/253827#M5105</guid>
      <dc:creator>Regina Judak</dc:creator>
      <dc:date>2017-01-05T16:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Door - Relation Parameters / Properties</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Door-Relation-Parameters-Properties/m-p/253828#M5106</link>
      <description>The problem with this is when you use 2 or more overlapping zones. That is, you have zone for the unit (like studio, 1br, 2br, etc.) and the sub-unit (like bedroom, kitchen, living room, etc.). Just put these two zones on different layer and hide the one that you don't need when calling your add-on.</description>
      <pubDate>Mon, 09 Jan 2017 09:45:15 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Door-Relation-Parameters-Properties/m-p/253828#M5106</guid>
      <dc:creator>ReignBough</dc:creator>
      <dc:date>2017-01-09T09:45:15Z</dc:date>
    </item>
    <item>
      <title>[SOLVED] Door - Relation Parameters / Properties</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Door-Relation-Parameters-Properties/m-p/253829#M5107</link>
      <description>Hi Regina, &lt;BR /&gt;
&lt;BR /&gt;
thank you very much. I have now all Informations I need. &lt;BR /&gt;
&lt;BR /&gt;
Best regards, &lt;BR /&gt;
&lt;BR /&gt;
M</description>
      <pubDate>Fri, 13 Jan 2017 16:32:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Door-Relation-Parameters-Properties/m-p/253829#M5107</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-13T16:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Door - Relation Parameters / Properties</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Door-Relation-Parameters-Properties/m-p/253830#M5108</link>
      <description>Hello Regina: &lt;BR /&gt;
&lt;BR /&gt;
I was hoping to get some clues as to the best approach for getting Door Label/Stamp Attributes with the API. &lt;BR /&gt;
&lt;BR /&gt;
You had provided very useful information before:&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;Regina wrote:&lt;BR /&gt;Hi,&lt;BR /&gt;
&lt;BR /&gt;
 The name of the parameter which describes the hinge side is "ac_openingSide".&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Regina&lt;/BLOCKQUOTE&gt;

The infos I am trying to get are in the picture (Doorstamp-&amp;gt;Settings-&amp;gt;Content3-&amp;gt;...):&lt;BR /&gt;
&lt;A href="https://drive.google.com/file/d/1CJJ4gqQRDYQHdMMkrW-O3u-rf41lVMNz/view" target="_blank"&gt;&lt;/A&gt;&lt;S&gt;&lt;A href="https://drive.google.com/file/d/1CJJ4gqQRDYQHdMMkrW-O3u-rf41lVMNz/view" target="_blank"&gt;&lt;/A&gt;&lt;A href="https://drive.google.com/file/d/1CJJ4gqQRDYQHdMMkrW-O3u-rf41lVMNz/view" target="_blank"&gt;&lt;/A&gt;&lt;/S&gt;&lt;LINK_TEXT text="https://drive.google.com/file/d/1CJJ4gq ... lVMNz/view"&gt;https://drive.google.com/file/d/1CJJ4gqQRDYQHdMMkrW-O3u-rf41lVMNz/view&lt;/LINK_TEXT&gt;&lt;E&gt;&lt;/E&gt;&lt;BR /&gt;
 &lt;BR /&gt;
It is not clear to me wether these informations should be within the door object/libpart or in the stamp/label itself. &lt;BR /&gt;
&lt;BR /&gt;
My guess is that they are actually stored in the stamp/label settings. I do not know however how to get a handle to this from the door. &lt;BR /&gt;
&lt;BR /&gt;
Any suggestions would be appreciated.</description>
      <pubDate>Tue, 12 Dec 2017 09:25:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Door-Relation-Parameters-Properties/m-p/253830#M5108</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-12T09:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Door - Relation Parameters / Properties</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Door-Relation-Parameters-Properties/m-p/253831#M5109</link>
      <description>&lt;BLOCKQUOTE&gt;mar_kq wrote:&lt;BR /&gt;Hello Regina: &lt;BR /&gt;
&lt;BR /&gt;
I was hoping to get some clues as to the best approach for getting Door Label/Stamp Attributes with the API. &lt;BR /&gt;
&lt;BR /&gt;
You had provided very useful information before:&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;Regina wrote:&lt;BR /&gt;Hi,&lt;BR /&gt;
&lt;BR /&gt;
 The name of the parameter which describes the hinge side is "ac_openingSide".&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Regina&lt;/BLOCKQUOTE&gt;

The infos I am trying to get are in the picture (Doorstamp-&amp;gt;Settings-&amp;gt;Content3-&amp;gt;...):&lt;BR /&gt;
&lt;A href="https://drive.google.com/file/d/1CJJ4gqQRDYQHdMMkrW-O3u-rf41lVMNz/view" target="_blank"&gt;&lt;/A&gt;&lt;S&gt;&lt;A href="https://drive.google.com/file/d/1CJJ4gqQRDYQHdMMkrW-O3u-rf41lVMNz/view" target="_blank"&gt;&lt;/A&gt;&lt;A href="https://drive.google.com/file/d/1CJJ4gqQRDYQHdMMkrW-O3u-rf41lVMNz/view" target="_blank"&gt;&lt;/A&gt;&lt;/S&gt;&lt;LINK_TEXT text="https://drive.google.com/file/d/1CJJ4gq ... lVMNz/view"&gt;https://drive.google.com/file/d/1CJJ4gqQRDYQHdMMkrW-O3u-rf41lVMNz/view&lt;/LINK_TEXT&gt;&lt;E&gt;&lt;/E&gt;&lt;BR /&gt;
 &lt;BR /&gt;
It is not clear to me wether these informations should be within the door object/libpart or in the stamp/label itself. &lt;BR /&gt;
&lt;BR /&gt;
My guess is that they are actually stored in the stamp/label settings. I do not know however how to get a handle to this from the door. &lt;BR /&gt;
&lt;BR /&gt;
Any suggestions would be appreciated.&lt;/BLOCKQUOTE&gt;

Hi,&lt;BR /&gt;
&lt;BR /&gt;
The following code snippet will give you the label(s) connected to a door/window:&lt;BR /&gt;

&lt;PRE&gt;	GS::Array&amp;lt;API_Guid&amp;gt; connectedLabels;
	ACAPI_Element_GetConnectedElements (doorGuid, API_LabelID, &amp;amp;connectedLabels);&lt;/PRE&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Best, Akos</description>
      <pubDate>Fri, 05 Jan 2018 13:01:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Door-Relation-Parameters-Properties/m-p/253831#M5109</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2018-01-05T13:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Door - Relation Parameters / Properties</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Door-Relation-Parameters-Properties/m-p/253832#M5110</link>
      <description>&lt;BLOCKQUOTE&gt;Akos wrote:&lt;BR /&gt;
&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
The following code snippet will give you the label(s) connected to a door/window:&lt;BR /&gt;

&lt;PRE&gt;	GS::Array&amp;lt;API_Guid&amp;gt; connectedLabels;
	ACAPI_Element_GetConnectedElements (doorGuid, API_LabelID, &amp;amp;connectedLabels);&lt;/PRE&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Best, Akos&lt;/BLOCKQUOTE&gt;

Hi Akos, &lt;BR /&gt;
&lt;BR /&gt;
thanks for the suggestion.&lt;BR /&gt;
 &lt;BR /&gt;
I was able to retrieve the information using the &lt;B&gt;guid of the door stamp&lt;/B&gt; directly through ACAPI_Element_GetMemo as suggested here: &lt;BR /&gt;
&lt;A href="http://archicad-talk.graphisoft.com/viewtopic.php?t=58645&amp;amp;sid=01ca91a39e2d5b62729678c17b88a1c5" target="_blank"&gt;archicad-talk.graphisoft.com/viewtopic.php?t=58645&amp;amp;sid=01ca91a39e2d5b62729678c17b88a1c5&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
But When I try using the ACAPI_Element_GetConnectedElements (with &lt;B&gt;element.header.guid&lt;/B&gt; or &lt;B&gt;element.door.head.guid&lt;/B&gt;) the resulting Array is empty. Any ideas why I am getting this behaviour?&lt;BR /&gt;
&lt;BR /&gt;
I am trying this now on AC21 by the way.</description>
      <pubDate>Thu, 11 Jan 2018 10:13:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Door-Relation-Parameters-Properties/m-p/253832#M5110</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-11T10:13:56Z</dc:date>
    </item>
  </channel>
</rss>

