View.AddFilter for multiple views

Hi everyone,

I have a script ready to add view filters to view templates. It only works on a single view template. I would like to change this so that a view filter can be added to multiple view templates at once.
However, the node view.addfilter only accepts one view. Does anyone have an idea for this? maybe there is a node in another custom package?

Thanks in advance for thinking along!

Hi @Reinier

You can add a list of views to the View.AddFilter. Dynamo will automatically use the Function for all the views in the list.

You do need to think about the levels in the Node. If you provide a list with 5 views and 5 filters, dynamo will add filter 1 to view 1 and filter 2 to view 2.

If you set the level for Views to @2 and the level for Filters to @1, Dynamo will add all the filters from the filter list to all the views.

Nice! It works, thanks!