Filter lists using Levels / Multiple Values

I’m currently developing some scripts to check model compliance with our internal naming standards. As part of this I need to identify and check the names of the view templates. The should contain a code (typically FP, SN, EL, SH etc) and I want to check the names against these codes.

Now because Revit doesn’t separate say elevations and sections my scripts I get a mix of say EL (elevations) and SN (sections) in the same list so need to check for either of these values. The same for plans that could have FP (floor plans) or AP (area plans).

If I just have a single value to check for in each list the script below works fine. But as soon as I add in a second value I can’t get this approach to work and end up filtering separate lists to get a viable result.

Can anyone suggest a simplifed solution without dropping into Python or Design Script (which I know is probably the way to do it but I want to exhaust this approach first!)

In this example the first list is searched for FP and returns anything that doesn’t match, the second SN and the third SH etc.

The script below splits the task into 3 and searches each individual list then recombined the values using TrueForAny node…

Any thoughts gratefully received.



View Sorting Forum Upload.dyn (38.5 KB)

I think you’re overthinking it; you’ve basically got it. It doesn’t really matter how your lists are organized. You should be able to check for each code individually, filter individually, and then combine lists however you want.

1 Like

Thanks, I’ll give this a go! I think you’re right, over thinking or maybe just not seeing the wood for the trees!