ParameterFilterElement.ByRules overwrites filter created before

Hi, I am having trouble using the script 2 times

the first time without problems, but the second time, the ParameterFilterElement.ByRules node overwrites the name and filter rules created the first time I run the routine

maybe use the same id

Please help

One thing to check on: Element Binding.

Read up on it here: Element Binding in Revit

Try using Dynamo Player to avoid it being added to the file after you strip any bindings.

Thanks Jacob
It works fine for me . I would like to explain the process

This is the script “Filtros2.1_01.dyn” I delete the bindings from txt. to start from zero. then i run it from Dynamo no Dyn player, just Dynamo. The script creates some filters adn assign it to view, and there are the IDS from each of them

bindings 2
bindings 3

So i run it for the second time with other parameters ( other name) , from Dynamo no Dyn player again. It creates the filters but overrides them on view AND overides them form filters panel ( thats a big problem beacuse it deletes the older ones that i had created before). And the IDS are the same, and the txt file gives me a lot of BINDINGS
bindings 5
bindings 6

So, I opened the txt again and delete the bindings, saved as “Filtros2.1_01-No bindings.dyn”.
this is a “clean” file that I will save.
Then i opened Dynamo Player and run the script ( you said that Dyn Player have no bindings) , so now i try to create another filter with another name from player. Run completed, and the filters are overrided in view BUT, not overrided in Filter create panel, so it works for me becasuse the older ones are still there and does not ruin the views previously created,
bindings 9
bindings 10
bindings 11

That´s the txt from the clean file after run it many times from Dyn player :slight_smile:
bindings 12

1 Like