<?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: I would like to know how to create a wall using Wall Geometry Method:Polygonal. in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/I-would-like-to-know-how-to-create-a-wall-using-Wall-Geometry/m-p/589351#M9190</link>
    <description>&lt;P&gt;Adding the Bug report link &lt;A href="https://graphisoft.atlassian.net/servicedesk/customer/portal/5/DSCS-1785" target="_blank"&gt;here&lt;/A&gt; for other community members to track&lt;/P&gt;</description>
    <pubDate>Thu, 22 Feb 2024 11:27:50 GMT</pubDate>
    <dc:creator>kency</dc:creator>
    <dc:date>2024-02-22T11:27:50Z</dc:date>
    <item>
      <title>I would like to know how to create a wall using Wall Geometry Method:Polygonal.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/I-would-like-to-know-how-to-create-a-wall-using-Wall-Geometry/m-p/401205#M8656</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LeeJaeYoung_1-1696588536446.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/46907i03E93F6096E7EBB1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LeeJaeYoung_1-1696588536446.png" alt="LeeJaeYoung_1-1696588536446.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I would like to know how to create a wall using Wall Geometry.&lt;BR /&gt;What sample code can I study?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2024 11:14:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/I-would-like-to-know-how-to-create-a-wall-using-Wall-Geometry/m-p/401205#M8656</guid>
      <dc:creator>LeeJaeYoung</dc:creator>
      <dc:date>2024-09-17T11:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: I would like to know how to create a wall using Wall Geometry Method:Polygonal.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/I-would-like-to-know-how-to-create-a-wall-using-Wall-Geometry/m-p/401454#M8670</link>
      <description>&lt;P&gt;I work on old buildings a lot where wall thicknesses vary and often are not even parallel. You can either draw the polygon directly or trace over a survey drawing using the space bar click.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Oct 2023 16:54:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/I-would-like-to-know-how-to-create-a-wall-using-Wall-Geometry/m-p/401454#M8670</guid>
      <dc:creator>Tim Ball</dc:creator>
      <dc:date>2023-10-08T16:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: I would like to know how to create a wall using Wall Geometry Method:Polygonal.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/I-would-like-to-know-how-to-create-a-wall-using-Wall-Geometry/m-p/401494#M8671</link>
      <description>&lt;P&gt;thank you.&lt;/P&gt;
&lt;P&gt;This is the c++ api forum. ^^&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I found Polygon in API_WallType. I think I'll probably use this.&lt;BR /&gt;I don't know if it's true.&lt;BR /&gt;It hasn't been tested yet.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LeeJaeYoung_0-1696810947599.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/47027i8B4CB6675B1BAE00/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LeeJaeYoung_0-1696810947599.png" alt="LeeJaeYoung_0-1696810947599.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LeeJaeYoung_1-1696812103234.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/47034iD9A35E268AFA89AB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LeeJaeYoung_1-1696812103234.png" alt="LeeJaeYoung_1-1696812103234.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 00:42:58 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/I-would-like-to-know-how-to-create-a-wall-using-Wall-Geometry/m-p/401494#M8671</guid>
      <dc:creator>LeeJaeYoung</dc:creator>
      <dc:date>2023-10-09T00:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: I would like to know how to create a wall using Wall Geometry Method:Polygonal.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/I-would-like-to-know-how-to-create-a-wall-using-Wall-Geometry/m-p/401733#M8682</link>
      <description>&lt;P&gt;Yes that's what you are looking for. You will have to use the polygon data in the memos.&lt;BR /&gt;Something like this:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;GSErrCode CreatePolyWall ()
{
  API_Element element {};
  element.header.type = API_WallID;
  ACAPI_Element_GetDefaults (&amp;amp;element, nullptr);

  element.wall.type = APIWtyp_Poly;
  element.wall.modelElemStructureType = API_BasicStructure;

  element.wall.poly.nCoords = 5;
  element.wall.poly.nSubPolys = 1;
  element.wall.poly.nArcs = 0;

  API_ElementMemo memo{};
  memo.coords = reinterpret_cast&amp;lt;API_Coord**&amp;gt; (
    BMAllocateHandle (sizeof (API_Coord) * (element.wall.poly.nCoords + 1), ALLOCATE_CLEAR, 0));
  if (memo.coords == nullptr) { return APIERR_MEMFULL; }

  (*memo.coords)[0] = { 0.0, 0.0 }; // always has to be (0,0)

  (*memo.coords)[1] = { 0.0, 0.0 };
  (*memo.coords)[2] = { 1.0, 0.0 };
  (*memo.coords)[3] = { 1.0, 1.0 };
  (*memo.coords)[4] = { 0.0, 1.0 };
  (*memo.coords)[5] = (*memo.coords)[1];

  memo.pends = reinterpret_cast&amp;lt;Int32**&amp;gt; (
    BMAllocateHandle (sizeof (Int32) * (element.wall.poly.nSubPolys + 1), ALLOCATE_CLEAR, 0));
  if (memo.pends == nullptr) { return APIERR_MEMFULL; }

  (*memo.pends)[0] = 0;
  (*memo.pends)[1] = 5; //index of polygon closing coordinate/vertex

  memo.vertexIDs = reinterpret_cast&amp;lt;UInt32**&amp;gt; (
    BMAllocateHandle (sizeof (UInt32) * (element.wall.poly.nCoords + 1), ALLOCATE_CLEAR, 0));
  if (memo.vertexIDs == nullptr) { return APIERR_MEMFULL; }
  (*memo.vertexIDs)[0] = element.wall.poly.nCoords;
  for (Int32 vIdx = 1; vIdx &amp;lt;= element.wall.poly.nCoords; ++vIdx) {
    (*memo.vertexIDs)[vIdx] = vIdx;
  }

  memo.edgeIDs = reinterpret_cast&amp;lt;UInt32**&amp;gt; (
    BMAllocateHandle (sizeof (UInt32) * (element.wall.poly.nCoords + 1), ALLOCATE_CLEAR, 0));
  if (memo.edgeIDs == nullptr) { return APIERR_MEMFULL; }
  (*memo.edgeIDs)[0] = 0;
  for (Int32 eIdx = 1; eIdx &amp;lt;= element.wall.poly.nCoords; ++eIdx) {
    (*memo.edgeIDs)[eIdx] = eIdx;
  }

  GSErrCode err = ACAPI_Element_Create (&amp;amp;element, &amp;amp;memo);
  ACAPI_DisposeElemMemoHdls (&amp;amp;memo);
  return err;
}
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 10 Oct 2023 06:41:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/I-would-like-to-know-how-to-create-a-wall-using-Wall-Geometry/m-p/401733#M8682</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2023-10-10T06:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: I would like to know how to create a wall using Wall Geometry Method:Polygonal.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/I-would-like-to-know-how-to-create-a-wall-using-Wall-Geometry/m-p/589322#M9185</link>
      <description>&lt;P&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/8527"&gt;@BerndSchwarzenbacher&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/11600"&gt;@LeeJaeYoung&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For me, Archicad crashes with this change when the add-on is invoked. Only if I explicitly change the Wall structure to Basic and invoke the add-on it renders without crashing. I have also tried this on Archicad 26 and 27 and the non-demo version. Please watch the loom video linked &lt;A href="https://www.loom.com/share/ac48d291dae348579d579ccb75865233" target="_blank"&gt;here.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any setting that we can use to avoid this? Rather than requesting the user to choose Basic Structure?&lt;/P&gt;&lt;P&gt;I am using MacOS.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 09:17:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/I-would-like-to-know-how-to-create-a-wall-using-Wall-Geometry/m-p/589322#M9185</guid>
      <dc:creator>kency</dc:creator>
      <dc:date>2024-02-22T09:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: I would like to know how to create a wall using Wall Geometry Method:Polygonal.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/I-would-like-to-know-how-to-create-a-wall-using-Wall-Geometry/m-p/589331#M9189</link>
      <description>&lt;P&gt;Hi Kency,&lt;BR /&gt;&lt;BR /&gt;I was able to reproduce the same issue as you have. It's very weird and I can't think of any explanation why it is like that.&lt;BR /&gt;It could be a bug in the API. So you could put a bug report for it with the developer support.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;BR /&gt;Bernd&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 10:12:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/I-would-like-to-know-how-to-create-a-wall-using-Wall-Geometry/m-p/589331#M9189</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2024-02-22T10:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: I would like to know how to create a wall using Wall Geometry Method:Polygonal.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/I-would-like-to-know-how-to-create-a-wall-using-Wall-Geometry/m-p/589351#M9190</link>
      <description>&lt;P&gt;Adding the Bug report link &lt;A href="https://graphisoft.atlassian.net/servicedesk/customer/portal/5/DSCS-1785" target="_blank"&gt;here&lt;/A&gt; for other community members to track&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 11:27:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/I-would-like-to-know-how-to-create-a-wall-using-Wall-Geometry/m-p/589351#M9190</guid>
      <dc:creator>kency</dc:creator>
      <dc:date>2024-02-22T11:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: I would like to know how to create a wall using Wall Geometry Method:Polygonal.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/I-would-like-to-know-how-to-create-a-wall-using-Wall-Geometry/m-p/589353#M9191</link>
      <description>&lt;P&gt;Seems like a bug. Does it crash even if you explicitly set the wall type to basic in the code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;element.wall.modelElemStructureType = API_BasicStructure;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 12:42:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/I-would-like-to-know-how-to-create-a-wall-using-Wall-Geometry/m-p/589353#M9191</guid>
      <dc:creator>Viktor Kovacs</dc:creator>
      <dc:date>2024-02-22T12:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: I would like to know how to create a wall using Wall Geometry Method:Polygonal.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/I-would-like-to-know-how-to-create-a-wall-using-Wall-Geometry/m-p/589356#M9192</link>
      <description>&lt;P&gt;Yes both in the video from kency and in my tests the wall type was explicitly set to basic and we get a crash.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 11:40:31 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/I-would-like-to-know-how-to-create-a-wall-using-Wall-Geometry/m-p/589356#M9192</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2024-02-22T11:40:31Z</dc:date>
    </item>
  </channel>
</rss>

