<?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: How to get List of Wall guid that relate to selected zon in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-List-of-Wall-guid-that-relate-to-selected-zone/m-p/210223#M6080</link>
    <description>&lt;BLOCKQUOTE&gt;Paodekcal wrote:&lt;BR /&gt;Can you tell me how API locate "roomedge" polygon index. Where is the first roomedge of the zone? In the right of the zone. Or start on the left. Clockwise or Counter-Clockwise.&lt;/BLOCKQUOTE&gt;
The polygon describing the room perimeter is stored in a &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;API_ElementMemo&lt;E&gt;&lt;/E&gt; structure associated with the room. You can retrieve this data using &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Element_GetMemo&lt;E&gt;&lt;/E&gt;. Read the documentation on &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;API_Polygon&lt;E&gt;&lt;/E&gt; for a better understanding of the memo contents. You can then index into the polygon vertices using &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;roomEdge&lt;E&gt;&lt;/E&gt;. Note that you need to examine both the &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;coords&lt;E&gt;&lt;/E&gt; and &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;parcs&lt;E&gt;&lt;/E&gt; structures in case the edge is an arc.</description>
    <pubDate>Tue, 28 Sep 2010 09:02:07 GMT</pubDate>
    <dc:creator>Ralph Wessel</dc:creator>
    <dc:date>2010-09-28T09:02:07Z</dc:date>
    <item>
      <title>How to get List of Wall guid that relate to selected zone?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-List-of-Wall-guid-that-relate-to-selected-zone/m-p/210219#M6076</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;How to get Wall Guid that relate to selected zone?&lt;BR /&gt;&lt;BR /&gt;In my project, I can get zone quantity and wall part out of it. &lt;STRONG&gt;But , are there any method that I can get guid of the wall around selected zone.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;This is my code snippet zone function. It's can get the area, volume, of the zone, etc. Another code it's can get "WallPart" from the zone. But It's not "Wall Guid". I want wall Guid because I want to get another value from the wall.&lt;BR /&gt;&lt;BR /&gt;Is it possible?&lt;BR /&gt;
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;static void DumpZoneQuantity(API_Element *element)		
{

	API_QuantityPar params;
	API_ZoneAllQuantity zone;
	
	BNZeroMemory(&amp;amp;params,sizeof(API_QuantityPar));
	BNZeroMemory(&amp;amp;zone,sizeof(API_ZoneAllQuantity));

	ACAPI_Element_GetQuantities(API_ZoneID,element-&amp;gt;header.index,&amp;amp;params, &amp;amp;zone, NULL, NULL, NULL, NULL, NULL);

	char	s[256] = { '\0' };
	char	output_string[1000] = "";
	sprintf (s, "Room %d \nGuid is %s\n",element-&amp;gt;header.index,APIGuid2GSGuid(element-&amp;gt;header.guid).ToUniString().ToCStr());
	strcat(output_string,s);
	sprintf (s, "The Height of room is %lf\n",zone.height);
	strcat(output_string,s);
	sprintf (s, "The Area is %lf\n",zone.area);
	strcat(output_string,s);
	sprintf (s, "Volume is %lf\n",zone.volume);
	strcat(output_string,s);
	sprintf (s, "Surface of Wall inside the room (not include windows, holes and doors is %lf\n",zone.wallsSurf);
	strcat(output_string,s);
	sprintf (s, "Surface of doors is %lf and total width of the doors is %lf\n",zone.doorsSurf,zone.doorsWidth);
	strcat(output_string,s);
	sprintf (s, "Surface of window is %lf and total width of window is %lf\n",zone.windowsSurf,zone.windowsWidth);
	strcat(output_string,s);
	WriteReport(output_string);
}

static void Do_SelectedGetValue()
{
	API_SelectionInfo 	selectionInfo;
	API_Neig			**selNeigs = NULL;
	ACAPI_Selection_Get (&amp;amp;selectionInfo, &amp;amp;selNeigs, false);

	if(selectionInfo.typeID == API_SelEmpty)			//No selection so we loop through all zone in the floorplan
	{
		GS::Array&amp;lt;API_Guid&amp;gt; elemList;
		ACAPI_Element_GetElemList (API_ZoneID, &amp;amp;elemList);
		for (Int32 i = 0; i &amp;lt; (Int32)elemList.GetSize (); ++i) {
			API_Element element;
			BNZeroMemory (&amp;amp;element, sizeof (API_Element));
			element.header.guid = elemList&lt;I&gt;;
			if (ACAPI_Element_Get (&amp;amp;element) == NoError) {
				DumpZoneQuantity(&amp;amp;element);
			}
		}
	}
	else											//If we have selection so we look at the zone, if no zone then print error
	{
		Int32 zone_count = 0;
		for (Int32 i = 0; i &amp;lt; selectionInfo.sel_nElem; i++)				//Loop through selection
		{
			API_ElemTypeID		typeID;
			typeID = Neig_To_ElemID ((*selNeigs)&lt;I&gt;.neigID);
			if (typeID == API_ZoneID)	
			{
				zone_count++;
				API_Element element;
				BNZeroMemory(&amp;amp;element,sizeof(API_Element));
				element.header.guid = (*selNeigs)&lt;I&gt;.guid;
				ACAPI_Element_Get (&amp;amp;element);

				DumpZoneQuantity(&amp;amp;element);
			}
		}

		if(zone_count == 0)
		{
			WriteReport("No zone selected");
		}
	}
}
&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;
Code2 : WallPart from RoomRelation. This is the method that I use.&lt;BR /&gt;
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;	API_RoomRelation relData;
	ACAPI_Element_GetRelations ((*selNeigs)[0].guid,API_ZombieElemID,(void*) &amp;amp;relData);
	
	API_WallPart *part;		
	part = *(relData.wallPart);
	//To use part[0],part[1] , ... , part[relData.nWallPart-1]
&lt;/PRE&gt;
Note : ((*selNeigs)[0] is the zone that I selected it.&lt;BR /&gt;&lt;BR /&gt;In the schedule in Archicad, It can do. I want all value like in the schedule&lt;BR /&gt;(picture in next post)&lt;BR /&gt;&lt;BR /&gt;Thank you for your information.&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ArchiCAD_Zone_Problem1.jpg" style="width: 381px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/6007i02AB95777C81E703/image-size/large?v=v2&amp;amp;px=999" role="button" title="ArchiCAD_Zone_Problem1.jpg" alt="ArchiCAD_Zone_Problem1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 09:26:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-List-of-Wall-guid-that-relate-to-selected-zone/m-p/210219#M6076</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-03T09:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to get List of Wall guid that relate to selected zon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-List-of-Wall-guid-that-relate-to-selected-zone/m-p/210220#M6077</link>
      <description>List and Schedule it can do.&lt;BR /&gt;
&lt;BR /&gt;
But I cannot code it with API&lt;BR /&gt;
&lt;BR /&gt;
How do I do?</description>
      <pubDate>Mon, 27 Sep 2010 03:20:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-List-of-Wall-guid-that-relate-to-selected-zone/m-p/210220#M6077</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-09-27T03:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to get List of Wall guid that relate to selected zon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-List-of-Wall-guid-that-relate-to-selected-zone/m-p/210221#M6078</link>
      <description>&lt;BLOCKQUOTE&gt;Paodekcal wrote:&lt;BR /&gt;Another code it's can get "WallPart" from the zone. But It's not "Wall Guid". I want wall Guid because I want to get another value from the wall.&lt;/BLOCKQUOTE&gt;
&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;API_WallPart&lt;E&gt;&lt;/E&gt; contains the index of the wall element. You can obtain more information about the wall (including the guid) with &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Element_Get&lt;E&gt;&lt;/E&gt; (using the index and element type).</description>
      <pubDate>Mon, 27 Sep 2010 13:29:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-List-of-Wall-guid-that-relate-to-selected-zone/m-p/210221#M6078</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2010-09-27T13:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to get List of Wall guid that relate to selected zon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-List-of-Wall-guid-that-relate-to-selected-zone/m-p/210222#M6079</link>
      <description>WOW!!! It's really "a strand of hair hiding a mountain" problem.&lt;BR /&gt;
&lt;BR /&gt;
Thank you for your advice.&lt;BR /&gt;
&lt;BR /&gt;
Now I can get Wall guid from index of wall in WallPart.&lt;BR /&gt;
&lt;BR /&gt;
---------------------------------------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
But another question &lt;BR /&gt;
&lt;BR /&gt;
Can you tell me how API locate "roomedge" polygon index. &lt;BR /&gt;
&lt;BR /&gt;
Where is the first roomedge of the zone? In the right of the zone. Or start on the left. Clockwise or Counter-Clockwise.</description>
      <pubDate>Tue, 28 Sep 2010 03:05:04 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-List-of-Wall-guid-that-relate-to-selected-zone/m-p/210222#M6079</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-09-28T03:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to get List of Wall guid that relate to selected zon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-List-of-Wall-guid-that-relate-to-selected-zone/m-p/210223#M6080</link>
      <description>&lt;BLOCKQUOTE&gt;Paodekcal wrote:&lt;BR /&gt;Can you tell me how API locate "roomedge" polygon index. Where is the first roomedge of the zone? In the right of the zone. Or start on the left. Clockwise or Counter-Clockwise.&lt;/BLOCKQUOTE&gt;
The polygon describing the room perimeter is stored in a &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;API_ElementMemo&lt;E&gt;&lt;/E&gt; structure associated with the room. You can retrieve this data using &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Element_GetMemo&lt;E&gt;&lt;/E&gt;. Read the documentation on &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;API_Polygon&lt;E&gt;&lt;/E&gt; for a better understanding of the memo contents. You can then index into the polygon vertices using &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;roomEdge&lt;E&gt;&lt;/E&gt;. Note that you need to examine both the &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;coords&lt;E&gt;&lt;/E&gt; and &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;parcs&lt;E&gt;&lt;/E&gt; structures in case the edge is an arc.</description>
      <pubDate>Tue, 28 Sep 2010 09:02:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-List-of-Wall-guid-that-relate-to-selected-zone/m-p/210223#M6080</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2010-09-28T09:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get List of Wall guid that relate to selected zon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-List-of-Wall-guid-that-relate-to-selected-zone/m-p/210224#M6081</link>
      <description>Thank you very much to you  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt; . My work now is more easier.</description>
      <pubDate>Wed, 29 Sep 2010 02:32:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-List-of-Wall-guid-that-relate-to-selected-zone/m-p/210224#M6081</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-09-29T02:32:30Z</dc:date>
    </item>
  </channel>
</rss>

