Element.setparameterbyname to revise Structural beam Y & Z justifcation in Dynamo script

A couple things:

  • Hovering over a node input will usually tell you the ObjectType it’s looking for. The element input is looking for an Element, not an ElementId.
  • Parameter names are case sensitive. Be sure you’re typing out the correct name.
  • You codeblock is creating a variable - that’s why it has an input. To create a string in a codeblock you need to use “”.

The other thing you’re going to run into is that the parameter values for structural framing justifications are not a string (so fixing your codeblock won’t help in this case.) I believe they are Integers. Most internal parameters selected with a dropdown either use ElementIds or a selector Integer. The best way to figure out what value you need for a dropdown parameter is to GetParameterValueByName from an existing element with the value you want. Then you know exactly what input Revit is looking for.

1 Like