Choose 1 parameter from list of parameters!

i try to add thermal parameter (just 1 exactly) with this script using dynamo … how to choose from this list of parameter only 1 value to add it to ( SetParameterByName) from all this list in easy way (if possible)
thanks in advance

Since you know the name of the parameter you can just use that (your codeblock in the bottom left) to get the parameter value from your material then apply that to the Cond. parameter in your element.

1 Like

can you tell me what exactly to use to (Get parameter value ) then apply it ? this is not project parameter its for model in place that not automatic accept the Thermal value as parameters in Revit .
if u can tell me what code to add or screen shot thanks alot

It seems like you’re just trying to write the Thermal Conductivity value of the material to the Cond. parameter of the element you have selected. Is that correct?

You can use GetParameterValueByName to get that value from the material element using just the name of the parameter. Then you would use the SetParameterByName node you already have to write that value to the Cond. parameter of the selected element.

1 Like

i try to force (Cond.) to always read (thermal value) from any materials
and when i use GetPar…byName … the in to (element) will be material ?!
i mean i want this thermal conductivity value to be always the (Cond.) parameter
+
var. in (GetPara…byname)
if you can tell me code script to this cause i will be so glad

all this i try just to add thermal parameter to model in place wall … its added to model in place but always Zero ( as energy parameter type)

Correct. The element input for GetParameterValue would be the Material, as that is the element with the parameter. Then you use that value as the input value for the SetParameter node.

1 Like

What does your warning say? My first guess would be units don’t match.

1 Like

i think this because value must be the value of parameter (thermal …) not the string … so i need to take it from (GetPara.ValuebyName) to value (as number only) ? i dont know exactly if this is the issue

so can i add it value as the (thermal) value only without this error message ?

what i need to take it from var to value ? in this case

It looks like you’re not getting the conductivity value. Try Thermal Conductivity X or Y and see if you have better luck with that.

same error and i even try other parameter … its show zero as in this pic …in GetParaValueByName

I didn’t realize that the thermal parameters weren’t actually properties of the material element. You’ll have to get the value from the parameter itself.

2 Likes

Zeman you could also use a List.GetItemAtIndex node to get a parameter. Then if you need to copy paste this part you only need to change 1 double.

1 Like

okay, i am setting it up for you!

1 Like

1 Like

It’s actually recommended you don’t do this. Parameters do not list in a consistent order so this method becomes unreliable. Filtering for the correct name is the best way to get a parameter in this case.

3 Likes

Nick they are actually sorted alfabetically, so they should always be in the same order.