FilteredElementCollector doesn't return every element?

Hey Guys !

Some really strange thing here. In a graph I use a FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Rooms).ToElements()
But it turn out it doesn’t return every element of the mentioned category

But when I snoop the DB, the Room is there with its category and nowhere to be found in the collector.

Any clue about what’s happening here ?

No error returned here but lapiece in Rooms returns false …

Is that room in a link, design option, or otherwise different than the rest of the rooms?

Is this the only room missing from the list?
What results to you get using ootb nodes for all elements of category?

Hello,

In addition to what was said previously, objects of type DB.Element cannot be compared (no Hash), but ElementId 's object can.
so try this

OUT = ElementId(6065864) in RoomIds

Thank you all,
Had no clue it wasn’t allowed to compare DB.Element !
After running several tests, the collector returned the missing room indeed. My issue was with an other part of my code / graph.

1 Like