False Positive of FilteredElementCollector(doc, viewId)

False Positive of FilteredElementCollector(doc, viewId)

Anonymous
Not applicable
508 Views
2 Replies
Message 1 of 3

False Positive of FilteredElementCollector(doc, viewId)

Anonymous
Not applicable

System Configuration: Revit 2013 on Win7 (64-bit)

 

I used

 

FilteredElementCollector(doc, viewId)

to get the elements shown on a view

but it returned an element (2nd duct in Fig. 2) that is in fact invisible on the view.

I ran the same code for the following two configurations. The result are the same.

Did I do something wrong on using the API?

1.png

Fig. 1

 

2.png

Fig. 2

0 Likes
509 Views
2 Replies
Replies (2)
Message 2 of 3

Joe.Ye
Alumni
Alumni
I think the reason is that the result section view's "Crop view" parameter value is unchecked(you can see this parameter in the properties pallete. So even the short wall was not covered in the section view's crop region, it is also visible in the section view. You can set the section view's "crop view" property to true to hide elements out of the cropbox.


Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 3 of 3

Anonymous
Not applicable

I have already checked the "Crop View". From the images below, you can see that the result are the same.

 

1.png

 

2.png

0 Likes