Choose your top Archicad wishes!

Read more
Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

How to get only shown elements in C++?

HKM
Contributor

ACAPI_Element_GetElemList(API_ZombieElemID, &elemList, APIFilt_OnVisLayer);
This gets all elements on the visible layer.

I want to exclude elements hidden by F5 key or 3D filters or else.
How to get only shown elements in C++?

Archicad26 Windows10 APIDevKit 26.3000

notes)want other methods other than send [ctrl+A].

1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Viktor Kovacs
Graphisoft
Graphisoft

You can use several filter options. In your case you probably need the APIFilt_In3D filter. So the call would look something like this:

ACAPI_Element_GetElemList(API_ZombieElemID, &elemList, APIFilt_OnVisLayer | APIFilt_In3D);

 

View solution in original post

2 REPLIES 2
Solution
Viktor Kovacs
Graphisoft
Graphisoft

You can use several filter options. In your case you probably need the APIFilt_In3D filter. So the call would look something like this:

ACAPI_Element_GetElemList(API_ZombieElemID, &elemList, APIFilt_OnVisLayer | APIFilt_In3D);

 

Thank you.
This worked as expected.
For some reason 'APIFilt_In3D' was convinced that it was useless.