FilteredElementCollector issue

FilteredElementCollector issue

rafaelyn
Explorer Explorer
520 Views
2 Replies
Message 1 of 3

FilteredElementCollector issue

rafaelyn
Explorer
Explorer

Hi,

 

I'm trying to list only visible Floor in this activeview (see Figure 1).

 

But when using:

 

___________________________________________________________________________

ElementCategoryFilter filter = new ElementCategoryFilter(BuiltInCategory.OST_Floors);
FilteredElementCollector collector1 = new FilteredElementCollector(doc, doc.ActiveView.Id);
collector1 = collector1.WherePasses(filter);

___________________________________________________________________________

 

He is also listing this Floor. (see Figure 2)

 

But if I change the Floor (see figure 3), it works and does not list the previous Floor.

 

Anybody can help me?

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

Joe.Ye
Alumni
Alumni

 

Hi rafaelyn

 

I cannot get your idea from those pictures.

Please add some comments to the two pictures.

thank you.



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

rafaelyn
Explorer
Explorer

Hi Joe!

 

Figure 1 shows the section view of my project.

 

When I use the above code it also lists the shaded slab (Figure 2).

 

using: new FilteredElementCollector (doc, doc.ActiveView.Id😞

 

he should not only list the slab down? (Figure 2, not hatched slab)

 

sorry my English (Google Translator).

0 Likes