Replace Parameter With Value a,b,c For Values x,y,z & Copy Value to Related Window From Room

Hi All,

I am trying to change the parameter value with another value from a string node for example if parameter value matches the fallowing (“BLD-01”,“BLD-02”,“BLD-03”,“BLD-04”,“BLD-05”,“BLD-06”) i want the value replaced for the fallowing ( “FXP.01”,“FXP.02”,“FXP.03”,“FXP.04”,“FXP.05”,“FXP.06”).

The values represents Different blinds located in a room instance parameter and i would like to copy the values to any windows from that room, how could i achieve this?

I am new to dynamo and i’m having some trouble. I would really appreciate some help and would be forever grateful.

Many Thanks.

You can create an IF loop, something like this:
x == a? Value1: x==b? Value2: and so on. This will give you list of values for your elements. I would give you and example but I’m not in the office anymore

add this after your filter

1 Like

An easier way would be to use dictionaries. Make a dictionary using the before as keys and the after as values, then you just need to get the values using the parameter and set them again. See the picture below:

It is easier to maintain than a long nested if statement and easier to understand at a glance.

I managed to achieve the first part of my question by doing the fallowing, this has replaced the parameter value from BLD-03 to FXP.03
and BLD-04 to FXP.04 and so on.

Now if anyone can help me with the second part of the question which is, how can i
copy parameter values from rooms to related windows (Window From Room).

I have Curtain walls enclosing my rooms with its curtain panels changed to window category so i can identify what room the panels are from and to. The rooms hold the information for the type of blinds needed, if i have a curtain wall that holds 25 windows and spans across multiple rooms i want to copy the room parameter value to each window related to the room. How can i do this ?

Thanks you all for the help and for such a quick response.