Yes/No parameter titleblock

Hi Everyone,

I am trying to set instances parameters to Yes or No in multiple Titleblocks at once. I am having issues when trying to filter the list twice :

  • First, I am filtering all sheets which contain “06_3”
  • Then I am filtering the ones which contain “06_3” and “Tr” and the one with “06_3” only. I would like to change different parameter in the IN or OUT output.

When I connect List.Filterbyboolenmask to the Elements nodes , the elements filtered aren’t correct but when connected to the first List.Filterbyboolenmask , the elements in the list are correct.

Could someone please help me on that ?

Thank you very much and have a great day.



you need to filter the list of sheets along with the text filter at each filter.

you are filtering the text twice, but only the sheets one time. Make sense?

Just copy the two boolean masks you already have, and run your sheets through them.

1 Like

What is important to keep in mind when filtering lists is their structure and relevant indices of each element.

When you do the first filter by bool mask you are removing items that don’t match your first filter criteria.

Therefore, when you undertake a second search within them the True/False boolean indexes you are creating in the second ‘string contains’ does not match the list length and relevant items in the original list anymore. So you cannot filter all of the original elements by the second boolean.

To make this work you need to filter the original list at each filter point, like so:

Also as an additional tip in shorthand codeblocks - You can create ranges with alphabetical characters and then simply add each one to the prefix.

sequence = "A".."H";
"BAT " + sequence;

Hi @haganjake2 ,

Thank you very much for your quick reply.

I did what you recommended but it is is not working exactly as I would like it to be. As you can see on new the screenshot I am now filtering :

  • all the sheets which contain “06_3”
  • all the sheets which contain “Tr”

But my intention is to filter :

  • all the sheets which contain “06_3”
  • all the sheets which contain “06_3” AND “Tr” (so for those sheets I would like to have 2 filters applied to it)

By the way thank you for the additional tip on codeblocks , it is exactly what I was looking for :slight_smile:

Have a good day.



Hi Charles,

So do you want 2 separate lists?

  • 1 list of sheets that contains JUST ‘0_63’
  • 1 list of sheets that contains both ‘0_63’ & ‘Tr’?

Yes exactly :slight_smile:

Hopefully the below & attached helps explain the logic of this exercise.

I created a generic list of sheets containing a range of values with a mix of all those which you are looking for.

I then isolated the ones containing JUST 0_63 by first checking for 0_63 and then checking for Tr. Isolating the ones which match the first criteria and then removing those that match the second (By taking the values from the OUT port on the second filter node).

It is worth noting that I am not filtering sheet names & the Revit sheets as elements separately here so remember to do them both for each time you filter.

I then do a cross product check on a list of both 0_63 & Tr and check afterwards if both values in the list are true (which signifies that the string contains both values). You can then use this to filter the sheet list with.

Hope this makes sense.

SheetFiltering.dyn (43.2 KB)

1 Like

Just realised I overcomplicated that - You only need to do 1 string contains check.

If straight away the list contains True True this means it contains both values and the revit sheets can be filtered using that boolean list.

If you do a second equality test with the result of the string contains to see if the values in the list = True, False (which represents strings containing 0_63 but not Tr) this gives you a boolean list again.

I’ve also added the extra hypothetical revit sheets elements to indicate what I meant by filtering those also.

SheetFiltering.dyn (50.8 KB)

1 Like

Hi Jake,

Thank you so much for your time.

The script is working perfectly now :slight_smile: I am not very familiar with the different lacing available but I followed your instructions and I will do some researches about it.
Anyway thank you again for the great explanations !

Have a good day.



1 Like

No probs at all - The primer is the best place to go to for learning about any of these foundational concepts:

Hope you also have a good day,

1 Like