Misleading info from ModelerAPI::Model::GetElementCount(). Possible bug.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-02-13
12:09 PM
- last edited on
2023-07-04
01:35 PM
by
Doreena Deng
ModelerAPI::Model::GetElementCount()about element count in the scene.
If there is 1 column in the scene, I get info there are 2 elements in the scene
It makes no sense to me. It's intended?
Should I bypass the newly added enums in order to parse the geometry correctly? Are those just some helpers?
Thanks for the reply.
A.
Solved! Go to Solution.
- Labels:
-
Add-On (C++)
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-02-17 02:28 PM
To start the building process we need num of elements in the scene. For AC <=22 it was ok, because
In AC 23 however, we can rely on this num no longer.
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
My recent working solution is to get to go one step deeper meaning I'm looking if mesh body has polygons

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-02-14 08:17 PM
However, since ARCHICAD 23, Columns and Beam may be composed of Segments.
So I believe
This probably also means that
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
I hope if I write totally wrong things here, a developer will correct me when they read this.
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-02-15 11:44 AM
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.
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.
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!
Central Innovation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-02-17 09:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-02-17 10:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-02-17 01:28 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-02-17 01:38 PM
Central Innovation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-02-17 02:28 PM
To start the building process we need num of elements in the scene. For AC <=22 it was ok, because
In AC 23 however, we can rely on this num no longer.
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
My recent working solution is to get to go one step deeper meaning I'm looking if mesh body has polygons