New Filters to project override existing


#1

Hello guys,
I have this graph that create new filters based on parameters values.
It was working fine, but somehow it has started doing something very weird…
Everytime I use it instead of creating new filters to the project it replace the ones I created before.
I have no idea why this is happening.
Graph attached and image.
ThanksCreate filters based on parameters values(0).dyn (11.2 KB)


Offsetting building pads to topo
#2

Image


#3

Are you closing Dynamo between each filter or are you trying to create multiple filters in the same session of Dynamo? You’ll need to close the graph between each run in order to commit the changes to Revit, otherwise Dynamo will “update” every time you run the graph and not save the previous Revit changes.


#4

Hello Nick,
I have close dynamo, close Revit, Uninstall Dynamo and Install it again, change the Name of the variable…
Nothing seems to work…


#5

Can you try running the script through Dynamo Player?


#6

I think you want to use GroupByKey and not SortByKey as well. Right now you’re creating a filter for every element not every value. You also need to make sure you’re only getting each parameter once per value for your filter rule.


#7

Hi Nick,
Yes I am going to try that and see if it works.
Thanks


#8

Hello Nick,
I don’t understand what is going on.
If I either sort or group the elements, the filter is replaced.
If I don’t do it the new filters are added.
If I dont sort the elements the filters come in revit in an arbitrary order.
Does anyone know how to fix this problem???
Is there any workaround??? Using different nodes?


#9

Does anyone know why this is happening and if there is any way to solve it???

Many thanks!


#10

I don’t know what to tell you. It’s working fine on my end. It creates a single filter for each parameter value. After I add new mass elements with additional parameter values I run the graph again. I get an error for the filters that already exist but the new ones get created fine and my filters all function properly.

Have you tried it on a brand new project?


#11

Hi Nick,
Can you please try my graph?
Maybe try a different category/parameter…
Create filters based on parameters values(0).dyn (11.2 KB)


#12

In the same Revit file please.


#13

Hello Nick,
You are right, I do not know what happened to me before.
But now seems to be working fine.
Thanks for trying.