Setting A text parameter based off a certain number value

Im trying to have dynamo fill in a text value paramter “COLOR” based off of a number value of a seperate parameter (CKT#). For example, if number is 2,7,11 then color = BLACK, if number is 1,4,12 then color = RED, if number = 3,5,9 then color = BLUE.

Could use dictionaries.

Screenshot:

Animation:

and file:
colorDictionary.dyn (10.8 KB)

2 Likes

Thank you @john_pierson. This is really cool. Will i be able to control the inputs based off of parameter values in my revit project? I use the number as a circuit number and it is a share parameter in one of my families. So i would like the color to read circuit number “X” and fill in a seperate text parameter of “COLOR”.

Yes, your parameter values would go into the “keys” portion on the last node

1 Like

Awesome! I will play around with it. I appreciate the help!!