Element FilterByParameterValue


i am trying to make a script that will gather every instance of a hiti can family and color it by size in the active view. my thought process now is get all elements in view inside active documents filter them by name (Hilti CS) then i was goint to filter by parameter value and use the OverrideColorInView node to change each filter list of elements. I cannot get the filterbyparametervalue node to work. I did get the GetParameterValueByName node to work and used the same inputs for the filter node. thanks for taking the time to read and let me know what information i can give to help
Can Color.dyn (23.7 KB)

What package is Element.FilterByParameterValue from? It is not a node I’m familiar with.

However, you can use the data from Element.GetParameterValueByName to either override the colour, simple example with column widths as the data chosen:

Or, you can group by the parameter and colour each group differently using a Color Range:

Hope this helps,


thats it! I was just going about it the wrong way thanks!

1 Like

i know this was finished but i tried googling it and tried copying the node exactly but how do you have a Code Block with both an input and output? i tried looking it up and couldn’t figure it out. is there a list somewhere of commands for code blocks?

The code block in the example above 0..1..#n is shorthand for creating a range (from 0 to 1 with n number of values). Because the number of values is expressed as a letter, in this case n, Dynamo recognises that as a variable, so adds it as an input. It would be the same for any letter or word (unless it’s a protected word)

There’s a section on DesignScript in the Dynamo Primer:

1 Like

thanks i will look into that