So I was using Dynamo code as I usually do but it suddenly started working differently.
I put Element.GetParameterValueByName in a code block but whereas I expected it to ask for two different inputs which I’d put in brackets behind that bit of code it now puts Element as it asks for an input for element. I don’t know what caused this change and older code which was done like previously described still works fine but with this new graph all my code suddenly works like this:
You are calling the method statically so you need to provide an Element instance as an input. DS is inconsistent as certain methods are supported both statically and non-statically, making it a bit of a lottery IMO - especially if there is no consistency to the semantics of your code. If you try myElement.GetParameterValueByName() (that’s a ‘non-static’ call on the instance rather than the type) you wont need to provide two inputs. Best thing to do is use node-to-code and let it decipher the semantics for you.
I have installed a couple of packages actually, I had no idea that could make a difference with the code.
I’m currently working in Dynamo 1.3.1 (there’s still projects running in Revit 2016 here…) and have the following packages installed:
archi-lab (2016.13.4)
bimporphNodes (2.5.1)
BumbleBee (2017.13.2)
Clockwork for Dynamo 1.x (1.31.1)
Data-Shapes (2017.6.17)
MEPover (2016.12.6)
Rhythm (2016.11.7)
Sastrugi (0.1.4)
spring nodes (110.0.2)
It wouldn’t be much of a problem for me to literally remove all of them as I tend to “unpack” custom nodes anyway so the Dynamo graphs are easier to share.