Is it possible to check wether an element is displayed within a view in VBA?
I have to find all elements which are currently shown in view 1 and add them to a named group.
The thing is that I cannot simply check the level of the element and check if this level is displayed or not because a displayset or a view clip volume may be active.
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Answer Verified By: quasi_modo
I decided to go down that road and it works fine!
I create a fence using the code below:
PT_Zaun(2).Y = ActiveDesignFile.Views(1).Extents.Y
PT_Zaun(3).X = ActiveDesignFile.Views(1).Extents.X
PT_Zaun(3).Y = ActiveDesignFile.Views(1).Extents.Y
PT_Zaun(4).X = ActiveDesignFile.Views(1).Extents.X
ActiveDesignFile.Fence.DefineFromViewPoints ActiveDesignFile.Views(1), PT_Zaun
Works perfectly for our needs!
Many thanks your your support!