<?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 coord of Curtain Wall in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-coord-of-Curtain-Wall/m-p/638737#M9941</link>
    <description>&lt;P&gt;Honestly, it's not what I asked about. But I found decision.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 06 Nov 2024 12:52:14 GMT</pubDate>
    <dc:creator>Lease</dc:creator>
    <dc:date>2024-11-06T12:52:14Z</dc:date>
    <item>
      <title>How to get coord of Curtain Wall</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-coord-of-Curtain-Wall/m-p/635671#M9895</link>
      <description>&lt;P&gt;Hi everyone! Please, help me&lt;/P&gt;
&lt;P&gt;I need to write the 1st vertex coordinate of selected Curtain Wall contour into API_Coord variable. But I get error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;GSErrCode err;
 err = NoError;

 API_Element CWElem = {};
 API_ElementMemo CWMemo = {};
 API_SelectionInfo selectionInfo;
 GS::Array&amp;lt;API_Neig&amp;gt; selNeigs;

 err = ACAPI_Selection_Get(&amp;amp;selectionInfo, &amp;amp;selNeigs, false);
 if (err != NoError)
  return err;

 CWElem.header.guid = selNeigs[0].guid;
 err = ACAPI_Element_Get(&amp;amp;CWElem);
 if (err != NoError)
  return err;

 err = ACAPI_Element_GetMemo(CWElem.header.guid, &amp;amp;CWMemo, APIMemoMask_All);
 if (err != NoError)
  return err;

 API_Coord coord = (*(*CWMemo.cWSegContour).coords)[0]; //error "Access Violation"

 return err;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please, help me to solve it. Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 20:23:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-coord-of-Curtain-Wall/m-p/635671#M9895</guid>
      <dc:creator>Lease</dc:creator>
      <dc:date>2024-10-14T20:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to get coord of Curtain Wall</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-coord-of-Curtain-Wall/m-p/635921#M9898</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please try the following code to see whether you can get the coords of curtain wall. The 1st coord should be j=1.&lt;/P&gt;
&lt;P&gt;HTH.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;	GS::Array&amp;lt;API_Guid&amp;gt; cwallList;
	GSErrCode err = ACAPI_Element_GetElemList(API_CurtainWallID, &amp;amp;cwallList, APIFilt_OnActFloor| APIFilt_IsEditable | APIFilt_OnVisLayer);

	for (API_Guid&amp;amp; guid : cwallList) {
         API_Element elem = {};
         elem.header.guid = guid;
         err = ACAPI_Element_Get(&amp;amp;elem);
         if (!err) {
			  API_ElementMemo memo = {};
			  err = ACAPI_Element_GetMemo(guid, &amp;amp;memo);
			  if (!err) {
				  for (Int32 j = 0; j &amp;lt;= elem.curtainWall.polygon.nCoords; j++) {
					  API_Tranmat tran = elem.curtainWall.planeMatrix;

					  double fx = (*memo.coords)[j].x;
					  double fy = (*memo.coords)[j].y;

					  double tx = tran.tmx[0] * fx + tran.tmx[1] * fy +tran.tmx[3];
					  double ty = tran.tmx[4] * fx + tran.tmx[5] * fy +tran.tmx[7];

					  DBPrintf("%d, %10.3lf, %10.3lf\n", j, tx, ty);
				  }
			  }
			  ACAPI_DisposeElemMemoHdls(&amp;amp;memo);
		 }
	}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 07:57:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-coord-of-Curtain-Wall/m-p/635921#M9898</guid>
      <dc:creator>Hiromichi Shinkawa</dc:creator>
      <dc:date>2024-10-16T07:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to get coord of Curtain Wall</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-coord-of-Curtain-Wall/m-p/637844#M9929</link>
      <description>&lt;P&gt;I'm sorry for late reply. So many work...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a curtain wall (length 4000 mm) and ran this code in debugger. I've got next values of variables &lt;STRONG&gt;j&lt;/STRONG&gt;, &lt;STRONG&gt;tx&lt;/STRONG&gt; and &lt;STRONG&gt;ty&lt;/STRONG&gt; :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="30px"&gt;&lt;STRONG&gt;j&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="30px"&gt;&lt;STRONG&gt;tx&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="30px"&gt;&lt;STRONG&gt;ty&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="30px"&gt;0&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="30px"&gt;-1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="30px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="30px"&gt;1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="30px"&gt;0&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="30px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="30px"&gt;2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="30px"&gt;4&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="30px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it what you asked me?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2024 15:53:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-coord-of-Curtain-Wall/m-p/637844#M9929</guid>
      <dc:creator>Lease</dc:creator>
      <dc:date>2024-10-30T15:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to get coord of Curtain Wall</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-coord-of-Curtain-Wall/m-p/637893#M9930</link>
      <description>&lt;P&gt;Hi, it shows you the selected curtain wall position is from (0,0) to (4,0). if you rewrite the (*memo.coord)[1], that should be the first vertex coordinate of the selected curtain wall. you need to call element change command if you'd like to modify the selected element.&lt;/P&gt;
&lt;P&gt;HTH.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2024 00:27:12 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-coord-of-Curtain-Wall/m-p/637893#M9930</guid>
      <dc:creator>Hiromichi Shinkawa</dc:creator>
      <dc:date>2024-10-31T00:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to get coord of Curtain Wall</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-coord-of-Curtain-Wall/m-p/638737#M9941</link>
      <description>&lt;P&gt;Honestly, it's not what I asked about. But I found decision.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2024 12:52:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-coord-of-Curtain-Wall/m-p/638737#M9941</guid>
      <dc:creator>Lease</dc:creator>
      <dc:date>2024-11-06T12:52:14Z</dc:date>
    </item>
  </channel>
</rss>

