How to filter elements inside the current zoom extent using .net api?

How to filter elements inside the current zoom extent using .net api?

Anonymous
Not applicable
639 Views
1 Reply
Message 1 of 2

How to filter elements inside the current zoom extent using .net api?

Anonymous
Not applicable

Hello

 

I need to find the family instance from the current extent. 

Objective is to show a list of instance after panning and zooming.

 

I used BoundingBoxIsInsideFilter(Outline) but what would be the outline input. If I create outline

from UIView.GetZoomCorners() that does not find any objects. 

 

But if I used a large static value like  new Outline(new XYZ(-500, -500, -100), new XYZ(500, 500, 100));

then it finds few elements.

 

 

Could you please provide me with the solution if you already know.

 

Thanks

Naym

0 Likes
640 Views
1 Reply
Reply (1)
Message 2 of 2

FAIR59
Advisor
Advisor

 UIView.GetZoomCorners()  is a flat Curve in the "ScreenPlane", so you'd find only instances that are cut by the view.

You have to take the view depth into account, and add the Points "at the back of the view" to your Outline. 

0 Likes