Filtering a list using existing Revit Schedule Filters?

Is it possible to filter a list (say, a list of rooms) by using the filters that are already set up in a Revit schedule? I see functionality for creating new schedule filters, but I’m interested in using existing schedule filters to automatically filter a list in Dynamo.

You can see in the screenshot that I’m able to achieve this manually by filtering what I don’t want, but I’d really like to be able to rely on what is boxed in red to handle the filtering automatically just incase the FilterType isn’t always “NotBeginsWith”.

Short answer… no, I don’t believe so.
However you could try running filters for all the filter types. This would give you filtered lists for each available type. Then you just check the actual filter type from the schedule and pick the filtered list for that type.

Example:

  • Filter elements for all filter types: BeginsWith, NotBeginsWith, Contains, NotContains, etc.
  • Combine these filtered element lists into a larger list, Outputs.
  • Check the actual schedule filter type against all your options.
  • In this case your filter type is NotBeginsWith which you know corresponds to Outputs[1].
  • Get the sublist at that location and you’re done. :partying_face:

I had considered doing that, but was hoping to avoid it. If I have a schedule that is using more than one filter type then I feel like it could be a nightmare gathering the results from each “filter exercise” and combining the correct information. I’ll give it a shot…maybe it will be easier than I am imagining it to be.

Following up on my own post to say that I was able to accomplish this by using the following post: