<?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 Building an Archicad 21 Add-on in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Building-an-Archicad-21-Add-on/m-p/262650#M4022</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;Hello,&lt;BR /&gt;I am a new Addon developer for Archicad 21. I know how to create one and make it work (with Visual Studio 2015). Today, I'd like to build one which allow me to scan every walls on a building plan, get their information (length, height...), get the connected walls information (position of the connection, angle...) and the roof information in order to generate Achicad objects (created by me) on an other plan according to this information. I dont understand very well English even if I understand fairly well the structures/unions of the documentation. I read it but I don't manage to use it properly to do what I want to do.&lt;BR /&gt;Can anybody help me to build my project ?&lt;BR /&gt;Regards.&lt;/DIV&gt;</description>
    <pubDate>Wed, 12 Jul 2023 18:36:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-07-12T18:36:17Z</dc:date>
    <item>
      <title>Building an Archicad 21 Add-on</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Building-an-Archicad-21-Add-on/m-p/262650#M4022</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hello,&lt;BR /&gt;I am a new Addon developer for Archicad 21. I know how to create one and make it work (with Visual Studio 2015). Today, I'd like to build one which allow me to scan every walls on a building plan, get their information (length, height...), get the connected walls information (position of the connection, angle...) and the roof information in order to generate Achicad objects (created by me) on an other plan according to this information. I dont understand very well English even if I understand fairly well the structures/unions of the documentation. I read it but I don't manage to use it properly to do what I want to do.&lt;BR /&gt;Can anybody help me to build my project ?&lt;BR /&gt;Regards.&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Jul 2023 18:36:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Building-an-Archicad-21-Add-on/m-p/262650#M4022</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-12T18:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Building an Archicad 21 Add-on</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Building-an-Archicad-21-Add-on/m-p/262651#M4023</link>
      <description>Hello, &lt;BR /&gt;
&lt;BR /&gt;
To scan every wall on a building plan, you can use the &lt;B&gt;ACAPI_Element_GetElemList&lt;/B&gt; function, 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;API_WallID&lt;E&gt;&lt;/E&gt; as its &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;typeID&lt;E&gt;&lt;/E&gt; parameter. You will get a GS::Array of API_Guid-s, corresponding to the placed walls.&lt;BR /&gt;
&lt;BR /&gt;
Using the GUIDs, you can get information about the elements, using the &lt;B&gt;ACAPI_Element_Get&lt;/B&gt; with an &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_Element&lt;E&gt;&lt;/E&gt; object, with the given GUID in its header. In 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;API_Element&lt;E&gt;&lt;/E&gt;'s wall member, you are able to get the height of the wall, and calculate its length using its beginning and end coordinates.&lt;BR /&gt;
&lt;BR /&gt;
To get connection data about a wall, you'll have to use the &lt;B&gt;ACAPI_Element_GetRelations&lt;/B&gt; function with an &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_WallRelation&lt;E&gt;&lt;/E&gt; object given as its &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;relData&lt;E&gt;&lt;/E&gt; parameter. Note that you'll have to call &lt;B&gt;ACAPI_DisposeWallRelationHdls&lt;/B&gt; after you don't need the data any more, to prevent memory leaks.&lt;BR /&gt;
&lt;BR /&gt;
Information about Roof elements can be retrieved in a similar manner, using the &lt;B&gt;ACAPI_Element_GetElemList&lt;/B&gt; (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;API_RoofID&lt;E&gt;&lt;/E&gt;) and &lt;B&gt;ACAPI_Element_Get&lt;/B&gt; functions.&lt;BR /&gt;
&lt;BR /&gt;
Best regards,&lt;BR /&gt;
Dénes</description>
      <pubDate>Tue, 06 Mar 2018 16:14:48 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Building-an-Archicad-21-Add-on/m-p/262651#M4023</guid>
      <dc:creator>dfintha</dc:creator>
      <dc:date>2018-03-06T16:14:48Z</dc:date>
    </item>
  </channel>
</rss>

