Few names of the same parameter

Hi,
I need to get one parameter and set it to other parameter value (it is diameter parameter). The problem is that “Pipes” have other name of this parameter than “Elbow” and “Elbow” other than “Reduction”. I get 3 parameters from 1 installation section which I need to get and set. Right now I found 2 options:

  1. Copy whole Dynamo scheme and change this one parameter in every other name of this parameter
  2. Create new parameter “Dynamo_Diameter” and set it’s value by every other name of “Diameter” in every categories then I got 1 parameter to option nr 1. It would be useful if option nr 1 contains huge dynamo scheme.
    Is there any way that Dynamo can do something like this:
    “Ok, I have pipe accesoriess category let’s check if first element has “Diameter” parameter, ok it has, I gonna take it. Let’s check next element, ok I don’t have “Diameter” parameter let’s check if it has “Diameter1” parameter, ok it has, I gonna tak it. Let’s check next element…”
    Sorry for quiet bad english, I am trying my best.
    Greetings

if you share some images with markup it will helpful for better understanding.



1 System type, 1 part of the installation, 3 parameters (other name from every pipe accessory). I want to get this parameters and set into other by one Dynamo.

Do I have to copy this part of dynamo 3 times and change “parameterName” in every case or can I do it easier?

Yes and no (at least not that i know of).

Use an IF statement. Get the values for each potential parameter name. Then check to see which ones aren’t empty/null.

1 Like

Could you show some short dynamo scheme?

It would be a codeblock with something like this:

Param1 != "" ? Param1 : 
Param2 != "" ? Param2 : 
Param3 != "" ? Param3 : 
"No value set.";
1 Like