What are the valid parameter names for Element.SetParameterByName

Dear Support,

When using Element.SetParameterByName, where to find the right parameter name? For example, I’d like to change “Unconnected Height” for a wall, what’s the parameter name then?

Thank you in advance!

Not support (nor do I know of any for this free product), but I’ll weigh in.

It’s kind of a loaded question too as custom parameters can be added to a job, renamed, and the like.
I recommend using the the “Element.Parameters” node to get a listing of every parameter name and current value for the wall you want to adjust. Then you can retype the string into the “parameterName” input of the “Element.SetParameterByName” node to match the parameter name (which comes before the : in the output of the element.parameters node.

Best,
-jacob

Also - if you are using Element.SetParameterByName, make sure that the parameter can be “set” manually (you clicking in the parameter field in Revit and typing something in). If the parameter is a read-only reporting type of parameter (usually grayed-out), then you won’t be able to set it using Dynamo.

For your specific question, I am pretty sure that “Unconnected Height” is reporting the height of the wall, so if you want to change it, you need to adjust the Base Offset or Top Offset of the wall (or the Base Level or Top Level). Essentially, any Parameter you can change manually in Revit is fair game for Setting from Dynamo. If it is a read only or reporting parameter in Revit, then you can only read the info into Dynamo (using Element.GetParameterValueByName).

Thank you much Jacob! I did see these names yesterday. But when I saw a “Code Block” example in http://dynamoprimer.com/en/08_Dynamo-for-Revit/8-3_Editing.html showing “BldgWidth” as a parameter name, I thought other parameters may follow the same naming convention.
I eventually made my SetParameterByName working for parameter name “Unconnected Height” once the “Top Constraint” is set to “Unconnected”.

Thank you much, Ben, for your comment! You’re right that a parameter has to be editable before I can “SetParamaterByName”. “Unconnected Height” of a wall is editable once the “Top Constraint” is set to “Unconnected”, for the Revit 2017 that I’m using.

…Just a quick chime in here…I’ve also found that some parameters are set by a drop-down menu (for instance when using “Top Constraint”, the drop-down menu in Revit lets you choose a level). You can use the “Level” node in Dynamo to define the “Top Constraint”. However, “Level” node in Dynamo won’t give you every option available in that same drop-down menu in Revit - meaning if you use the “Level” node, you can choose all the levels except “Unconnected” (because it’s not available in the Dynamo node).