Change existing "Filter.Rules" of an "ParameterFilterElement"


Hello to everybody,

i am actually working on an tool which creates “ParameterFilterElements”. The aim behind of it -> handling all filters in an Excel and than let dynamo create the “ParameterFilterElements”. This is already running and doing well. The information in this workflow comes from excel.

So where is the Problem:
If i have to use the tool again to do some changes to some “filter.rules” it can’t be written to revit, because the “ParameterFilterElement.byRules” can’t change or overwrite an existing “ParameterFilterElement”.

What i have tried:
It is no problem to divide the existing “ParameterFilterElements” from the new ones and just create those who are new. So the new ones can be created but those who are already in revit can’t be changed.

Workaround – delete & new:
A Workaround which would work is, to delete the existing “ParameterFilteElements” and create the new one.
In this case, all definitions in the the “view templates” also will be deleted – so this workaround is not that straight forward…

Is there any way to change the existing “filter.rules” in the “ParameterFilteElement”??

thanks for advice.

BR Matthew85


Having the same problem.


This is not the best idea I confess but …

  • Could you gather up all views & templates using this filter,
  • Get their overrides.
  • Do your Delete & New
  • Apply this new filter to the views you’ve gathered

Tedious I know, but it could work.


hello 2 everybody – i just took the workaround… cause there was no solution…


If you are handy with the Revit API - it appears that there is a method for ParameterFilterElements called ClearRules() which would seem to leave the ParameterFilterElement intact but be waiting for a new revised set of rules from your script.