<?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: Curtain wall coordinates in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Curtain-wall-coordinates/m-p/262911#M3454</link>
    <description>Thanks! This works perfectly for my facade.</description>
    <pubDate>Wed, 21 Nov 2018 09:49:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-11-21T09:49:33Z</dc:date>
    <item>
      <title>Curtain wall coordinates</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Curtain-wall-coordinates/m-p/262909#M3452</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hello Archicad forum,&lt;BR /&gt;&lt;BR /&gt;What would be the easiest way to get the corner position coordinates of a curtain wall. For a normal wall I use begC and endC and the width to determine the 4 corner coordinates of a vertical wall. However, I could not determine those coordinates for curtain wall. Neither segmentData, cornerFrameData nor boundaryFrameData of API_​CurtainWallType let me retrieve any information (x and y is always 0.0). I have the suspicion it is more complicated since a curtain wall comprises multiple elements.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;- Dan&lt;/DIV&gt;</description>
      <pubDate>Wed, 05 Oct 2022 11:31:01 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Curtain-wall-coordinates/m-p/262909#M3452</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-05T11:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Curtain wall coordinates</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Curtain-wall-coordinates/m-p/262910#M3453</link>
      <description>Hi Dan,&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;dan wrote:&lt;BR /&gt;Neither segmentData, cornerFrameData nor boundaryFrameData of API_​CurtainWallType let me retrieve any information (x and y is always 0.0).&lt;/BLOCKQUOTE&gt;
The segmentData, cornerFrameData and boundaryFrameData members of API_CurtainWallType contain the default settings of the segments, corner frames and boundary frames. That's why those members do not contain any geometry informations.&lt;BR /&gt;
&lt;BR /&gt;
Curtain Wall is a composite element so it contains multiple subelements (segments, frames, panels, accessories and junctions). You can retrieve the subelements of a curtain wall by calling the ACAPI_Element_GetMemo function.&lt;BR /&gt;
&lt;BR /&gt;
For example the curtain wall on the picture below has 3 segments (I marked them with red lines) and the beginning and end points of the segments are marked with red crosses.&lt;BR /&gt;
Use this code to get the begC and endC of the segments:
&lt;PRE&gt;GS::Array&amp;lt;GS::Pair&amp;lt;API_Coord3D, API_Coord3D&amp;gt;&amp;gt; GetCurtainWallSegmentsCoords (const API_Guid&amp;amp; cwGuid)
{
	GS::Array&amp;lt;GS::Pair&amp;lt;API_Coord3D, API_Coord3D&amp;gt;&amp;gt; result;

	API_Element		element;
	BNZeroMemory (&amp;amp;element, sizeof (API_Element));
	element.header.guid = cwGuid;

	GSErrCode err = ACAPI_Element_Get (&amp;amp;element);
	if (err == NoError) {
		API_ElementMemo	memo;
		BNZeroMemory (&amp;amp;memo, sizeof (API_ElementMemo));

		err = ACAPI_Element_GetMemo (element.header.guid, &amp;amp;memo, APIMemoMask_CWallSegments);
		if (err == NoError &amp;amp;&amp;amp; memo.cWallSegments != nullptr) {
			for (UIndex ii = 0; ii &amp;lt; element.curtainWall.nSegments; ++ii) {
				const API_CWSegmentType&amp;amp; segment = memo.cWallSegments[ii];
				GS::Pair&amp;lt;API_Coord3D, API_Coord3D&amp;gt; coordPair (segment.begC, segment.endC);
				result.Push (coordPair);
			}
		}

		ACAPI_DisposeElemMemoHdls (&amp;amp;memo);
	}

	return result;
}&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Nov 2018 15:12:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Curtain-wall-coordinates/m-p/262910#M3453</guid>
      <dc:creator>Tibor Lorantfy</dc:creator>
      <dc:date>2018-11-19T15:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Curtain wall coordinates</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Curtain-wall-coordinates/m-p/262911#M3454</link>
      <description>Thanks! This works perfectly for my facade.</description>
      <pubDate>Wed, 21 Nov 2018 09:49:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Curtain-wall-coordinates/m-p/262911#M3454</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-21T09:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Curtain wall coordinates</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Curtain-wall-coordinates/m-p/262912#M3455</link>
      <description>Please forgive me, I forget to dispose the memo handle in my code above. &lt;PRE&gt;ACAPI_DisposeElemMemoHdls (&amp;amp;memo);&lt;/PRE&gt;
Without that line it causes memory leaks. I updated the code today.</description>
      <pubDate>Thu, 13 Dec 2018 10:55:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Curtain-wall-coordinates/m-p/262912#M3455</guid>
      <dc:creator>Tibor Lorantfy</dc:creator>
      <dc:date>2018-12-13T10:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Curtain wall coordinates</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Curtain-wall-coordinates/m-p/262913#M3456</link>
      <description>&lt;BLOCKQUOTE&gt;Tibor wrote:&lt;BR /&gt;
Please forgive me, I forget to dispose the memo handle in my code above. &lt;PRE&gt;ACAPI_DisposeElemMemoHdls (&amp;amp;memo);&lt;/PRE&gt;
Without that line it causes memory leaks. I updated the code today.
&lt;/BLOCKQUOTE&gt;

Thanks Tibor, I have already added this memo dispose line after implementing some other memo code based on the examples, so I did not actively realize it was missing from your example &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;</description>
      <pubDate>Thu, 13 Dec 2018 11:04:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Curtain-wall-coordinates/m-p/262913#M3456</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-13T11:04:25Z</dc:date>
    </item>
  </channel>
</rss>

