How to get only placed elements guids?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-05-14
02:14 PM
- last edited on
2022-10-04
04:33 PM
by
Daniel Kassai
I am using ACAPI_Element_GetElemList but none of the filters helps me get the guids of only the placed elements. On a new project the function gets 16 guids and if I place 2 elements then I get 18 guids. I thought this filter
ACAPI_Element_GetElemList (API_ObjectID, &elemListGuid, APIFilt_OnActLayout)was the right one but it turned out none of them is right.
Is it possible to do what I want here?
Solved! Go to Solution.
- Labels:
-
Add-On (C++)
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-05-14 03:09 PM
Anyway, this should do the trick because after placing the objects the user should change to 3D view in order to fix the objects position one according to another

If there is nothing I can improve for now, thanks, guys!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-05-14 02:27 PM
n.mihaylov wrote:It's a good filter for limiting selection to the active floor. I used it a lot with success. Never had more GUIDs.
was the right one but it turned out none of them is right.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-05-14 02:35 PM
ACAPI_Element_GetElemList returns the placed elements without any filter from the current database.
It returns 16 guids for a new project because a new project already can contain placed elements (for example elevations are coming from the template).
You can filter elements with 3D representation by using the APIFilt_In3D, this could be useful to filter out the elevations for example.
Regards,
Tibor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-05-14 02:44 PM
Tibor wrote:Is it working like this with API_ObjectID? Shouldn't you pass Zombie type to get all types of elements in db?
returns the placed elements without any filter from the current database

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-05-14 02:50 PM
kzaremba wrote:Yes, it will return elements with all types only when using API_ZombieElemID.
Tibor wrote:Is it working like this with API_ObjectID? Shouldn't you pass Zombie type to get all types of elements in db?
returns the placed elements without any filter from the current database
But the point is that if you create a new project from a template then it will already contain elements before you placed anything (it depends on your template).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-05-14 03:09 PM
Anyway, this should do the trick because after placing the objects the user should change to 3D view in order to fix the objects position one according to another

If there is nothing I can improve for now, thanks, guys!