<?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: Misleading info from ModelerAPI::Model::GetElementCount(). Possible bug. in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Misleading-info-from-ModelerAPI-Model-GetElementCount-Possible/m-p/293933#M2730</link>
    <description>I am not a developer, so I won't be able to answer coding questions.&lt;BR /&gt;
However, since ARCHICAD 23, Columns and Beam may be composed of Segments.&lt;BR /&gt;
So I believe &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ColumnElement &lt;E&gt;&lt;/E&gt;will return the total number of Columns, while &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ColumnSegmentElement &lt;E&gt;&lt;/E&gt;will return  the total number of Segments within all those Columns.&lt;BR /&gt;
This probably also means that &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ColumnSegmentElement &lt;E&gt;&lt;/E&gt; is always equal to or greater than &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ColumnElement &lt;E&gt;&lt;/E&gt;since there is always at least 1 Segment in 1 Column.&lt;BR /&gt;
&lt;BR /&gt;
Example: You have 1 Column with 1 Segment in it, 1 Column with 2 Segments in it, and 1 Column with 3 Segments in it. In this case &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ColumnElement &lt;E&gt;&lt;/E&gt; should be 3, while &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ColumnSegmentElement &lt;E&gt;&lt;/E&gt; should be 6.&lt;BR /&gt;
&lt;BR /&gt;
I hope if I write totally wrong things here, a developer will correct me when they read this.</description>
    <pubDate>Fri, 14 Feb 2020 19:17:20 GMT</pubDate>
    <dc:creator>Laszlo Nagy</dc:creator>
    <dc:date>2020-02-14T19:17:20Z</dc:date>
    <item>
      <title>Misleading info from ModelerAPI::Model::GetElementCount(). Possible bug.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Misleading-info-from-ModelerAPI-Model-GetElementCount-Possible/m-p/293932#M2729</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;While parsing the scene, I'm getting misleading info from
&lt;PRE&gt;ModelerAPI::Model::GetElementCount()&lt;/PRE&gt;
about element count in the scene. &lt;BR /&gt;&lt;BR /&gt;If there is 1 column in the scene, I get info there are 2 elements in the scene &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ColumnElement 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;ColumnSegmentElement. &lt;BR /&gt;&lt;BR /&gt;It makes no sense to me. It's intended?&lt;BR /&gt;&lt;BR /&gt;Should I bypass the newly added enums in order to parse the geometry correctly? Are those just some helpers?&lt;BR /&gt;Thanks for the reply.&lt;BR /&gt;A.&lt;/DIV&gt;</description>
      <pubDate>Tue, 04 Jul 2023 11:35:44 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Misleading-info-from-ModelerAPI-Model-GetElementCount-Possible/m-p/293932#M2729</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-04T11:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Misleading info from ModelerAPI::Model::GetElementCount(). Possible bug.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Misleading-info-from-ModelerAPI-Model-GetElementCount-Possible/m-p/293933#M2730</link>
      <description>I am not a developer, so I won't be able to answer coding questions.&lt;BR /&gt;
However, since ARCHICAD 23, Columns and Beam may be composed of Segments.&lt;BR /&gt;
So I believe &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ColumnElement &lt;E&gt;&lt;/E&gt;will return the total number of Columns, while &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ColumnSegmentElement &lt;E&gt;&lt;/E&gt;will return  the total number of Segments within all those Columns.&lt;BR /&gt;
This probably also means that &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ColumnSegmentElement &lt;E&gt;&lt;/E&gt; is always equal to or greater than &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ColumnElement &lt;E&gt;&lt;/E&gt;since there is always at least 1 Segment in 1 Column.&lt;BR /&gt;
&lt;BR /&gt;
Example: You have 1 Column with 1 Segment in it, 1 Column with 2 Segments in it, and 1 Column with 3 Segments in it. In this case &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ColumnElement &lt;E&gt;&lt;/E&gt; should be 3, while &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ColumnSegmentElement &lt;E&gt;&lt;/E&gt; should be 6.&lt;BR /&gt;
&lt;BR /&gt;
I hope if I write totally wrong things here, a developer will correct me when they read this.</description>
      <pubDate>Fri, 14 Feb 2020 19:17:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Misleading-info-from-ModelerAPI-Model-GetElementCount-Possible/m-p/293933#M2730</guid>
      <dc:creator>Laszlo Nagy</dc:creator>
      <dc:date>2020-02-14T19:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Misleading info from ModelerAPI::Model::GetElementCount(). Possible bug.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Misleading-info-from-ModelerAPI-Model-GetElementCount-Possible/m-p/293934#M2731</link>
      <description>Laszlo is correct. Beams and columns are now assemblies like the curtain wall or stair elements. An assembly is comprised of a parent element and any number of child component elements ("segments" for beams and columns). When you migrate a column or beam element from AC22 to AC23, it becomes 2 elements: a parent and 1 child segment.&lt;BR /&gt;
&lt;BR /&gt;
This presents a number of complications for developers and users, particularly when there is an important distinction between the the assembly as a whole or a component in the assembly. Consider a modeless palette that interacts with selected elements. Typically the user can only select the parent assembly - but what if the user wants to interact with one of the child elements? Assemblies support an "edit" mode, where the individual parts can be selected an interacted with, but only for a single assembly. And worse, if a beam/column has only a single segment (which is typically the case) you can't enter 'edit' mode at all, and therefore it is impossible to engage with the segment through a modeless palette.&lt;BR /&gt;
&lt;BR /&gt;
The problem is compounded by the fact that the parent and child elements have separate meta-data, e.g. ID, classification, properties etc. A beam/column migrated from AC22 to AC23 migrates the meta-data into the parent assembly but not into the child segment. So, for example, if you have a database coupling records on the basis of ID and extracting data related to materials or surfaces, this completely breaks down because the child segments with the required data haven't inherited the meta-data values of the parent. And there is no easy way for the user to inspect this because modeless interaction with the child segment isn't possible. We could work around this by assuming the selection means the child, but this will break in future if they start creating multi-segment beams/columns.&lt;BR /&gt;
&lt;BR /&gt;
This is causing a headache for some of our largest customer and we're still working with them to devise an appropriate response. I hope your requirements prove to be much simpler!</description>
      <pubDate>Sat, 15 Feb 2020 10:44:18 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Misleading-info-from-ModelerAPI-Model-GetElementCount-Possible/m-p/293934#M2731</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2020-02-15T10:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: Misleading info from ModelerAPI::Model::GetElementCount(). Possible bug.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Misleading-info-from-ModelerAPI-Model-GetElementCount-Possible/m-p/293935#M2732</link>
      <description>Thank you for your response, Laszlo, Ralph. It makes sense from the user perspective, however, I somehow feel there is something wrong 'under the hood' and this code will be refactored in some way sooner or later. Looks like Ralph can confirm. Luckily, it's not a big issue for us, we just bypass the newly added elements as they seem are having no geometry representation in the scene so we can't parse them.</description>
      <pubDate>Mon, 17 Feb 2020 08:00:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Misleading-info-from-ModelerAPI-Model-GetElementCount-Possible/m-p/293935#M2732</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-17T08:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: Misleading info from ModelerAPI::Model::GetElementCount(). Possible bug.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Misleading-info-from-ModelerAPI-Model-GetElementCount-Possible/m-p/293936#M2733</link>
      <description>Sorry, I was wrong. 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;ColumnElement &lt;E&gt;&lt;/E&gt; is the one that has no geom. info, not 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;ColumnSegmentElement&lt;E&gt;&lt;/E&gt;</description>
      <pubDate>Mon, 17 Feb 2020 09:51:49 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Misleading-info-from-ModelerAPI-Model-GetElementCount-Possible/m-p/293936#M2733</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-17T09:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Misleading info from ModelerAPI::Model::GetElementCount(). Possible bug.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Misleading-info-from-ModelerAPI-Model-GetElementCount-Possible/m-p/293937#M2734</link>
      <description>And digging deeper, it's still not so straightforward...From the geometry parsing perspective, DoorElement is ok but WindowElement is not.  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_redface.gif" style="display : inline;" /&gt;</description>
      <pubDate>Mon, 17 Feb 2020 12:28:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Misleading-info-from-ModelerAPI-Model-GetElementCount-Possible/m-p/293937#M2734</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-17T12:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Misleading info from ModelerAPI::Model::GetElementCount(). Possible bug.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Misleading-info-from-ModelerAPI-Model-GetElementCount-Possible/m-p/293938#M2735</link>
      <description>What process are you aiming to implement?</description>
      <pubDate>Mon, 17 Feb 2020 12:38:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Misleading-info-from-ModelerAPI-Model-GetElementCount-Possible/m-p/293938#M2735</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2020-02-17T12:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Misleading info from ModelerAPI::Model::GetElementCount(). Possible bug.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Misleading-info-from-ModelerAPI-Model-GetElementCount-Possible/m-p/293939#M2736</link>
      <description>@Ralph: Parsing scene geometry. The final step of this process is decomposing polygons into a set of convex polygons and converting them to triangles.&lt;BR /&gt;
To start the building process we need num of elements in the scene. For AC &amp;lt;=22 it was ok, because &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ModelerAPI::Model::GetElementCount()&lt;E&gt;&lt;/E&gt; was returning relevant number =&amp;gt; 1 column = 1 element.&lt;BR /&gt;
In AC 23 however, we can rely on this num no longer. &lt;BR /&gt;
My first approach was to select which enum values are relevant but it was the wrong way. Then my next idea was to obtain num of &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;GetMeshBodyCount&lt;E&gt;&lt;/E&gt;() or &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;GetTessellatedBodyCount&lt;E&gt;&lt;/E&gt;(). But it was also wrong because for example, &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ColumnElement &lt;E&gt;&lt;/E&gt;was returning it has a Body, but the body had no polys. &lt;BR /&gt;
&lt;BR /&gt;
My recent working solution is to get to go one step deeper meaning I'm looking if mesh body has polygons &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;MeshBody::GetPolygonCount()&lt;E&gt;&lt;/E&gt; -&amp;gt; if yes -&amp;gt; it's ok to build...</description>
      <pubDate>Mon, 17 Feb 2020 13:28:31 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Misleading-info-from-ModelerAPI-Model-GetElementCount-Possible/m-p/293939#M2736</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-17T13:28:31Z</dc:date>
    </item>
  </channel>
</rss>

