Filtering elements with no level

Is there a theory for filtering elements that do not have levels?
My method is to enter all the levels that the document has into the filter and set inverted to true to select elements that do not have a level, but I would like to know if there is a better way.

Also, my method does not always filter out the elements that do not have a level when crossed with the regular level filter, how can I solve this?

Selecting 4th floor elements and elements without levels.

In this file, when 1FL and 7FL are included in the level filter, elements without levels cannot be filtered.

Filtering elements without Level.gh (11.1 KB)

The project file I am using is the one in the link below.

thanks,

Did you give it a try with Exclusion Filter ?

1 Like

Just to Add here you can try combining Parameter Filter (INSTANCE_REFERENCE_LEVEL_PARAM) with Level Filter

1 Like

thank you for your reply.
I tried this approach, but did not adopt it because I judged that the calculation cost might be too high for querying all levels of elements in the first place. Sometimes I have tens of thousands of elements to query and would like to consider a less costly method.

What do you enter for Value in the Parameter Filter?
empty or Space?
The input does not seem to go through when I do the same.

no space just empty

Hmmm, I can’t get through with Empty.
What version are you using? I’m on v1.31, but if it passes with something newer than that, I’ll wait for the stable version of it.
thanks,

@hiro1122

Sorry for the confusion it doesn’t take empty panel. My Grasshopper Preview was off so i couldn’t see the error.

Have you tried @jessesn workflow?

Yes, I considered that approach, but did not adopt it because I thought it was a bit aggressive.
That said, there are still problems with my method, as I mentioned at the beginning.
If @Jessesn’s method is appropriate, I feel that I need to devise a way to reduce the computational cost a bit more at the point where all the elements are obtained.

Considering that it takes about 120ms for about 7000 elements, it could take several seconds when the number increases, and I would like to avoid that.

You can set level to None using the Level Container

thanks for your try.
I thought that way would not pass because the filter would show “nothing”, but does it work?

for this specific element the Target Parameter is Elevation from Level and it takes Numeric Value.

It’s an attempt to get an element without a level with a parameter other than the level parameter. Interesting.
So this way we get a Revit Component that is not primarily a System Family. And most of them don’t have Levels. But there are some Revit Components that have some Levels, so there is an issue of how this needs to be filtered out, but it is very interesting.
Thanks!