Element.GetParameterValueByName fails with Linked Revit element in Revit 2021 but not 2020

I have a graph that worked well in Revit 2020 and I’m trying to bring it into Revit 2021 and it fails at Element.GetParameterValueByName. I’m accessing the levels from a Linked Revit file and while I can see the information in the output of the node and it looks the same as in Dynamo under Revit 2020, it fails in Revit 2021. Clearly something changed between the two but I’m at a loss as to how to solve it. Revit 2021 is running Dynamo while Revit 2020 is running Dynamo Any help would be greatly appreciated.

Try LinkElement.GetParameterValueByName from Bimorph Package

I am not sure what has happened. Maybe one of the developers could chime in? Reading this I too am going to need to update my graphs as I am doing the same thing you are. I do know Bimorph’s node will solve the problem but it is a shame when things go backwards.

One easy thing to try: add a code block with “[y]” in it. This will index your level in a list and may solve the problem (this is a long shot though and I am doubtful).

Most likely has to do with the version of Dynamo and the nodes. In 2021 they changed to SpecType.


yep - @ziyun.shang can probably explain better than I can - but the underlying revit API changed - one way to improve it in the future is to not expose revit api types directly to the public signatures in DynamoRevit’s nodes so DynamoRevit can be better isolated from Revit API changes, but that is sometimes not possible.
Update obsolete function for RevitAPI updated by ZiyunShang · Pull Request #2509 · DynamoDS/DynamoRevit (github.com)

I am curious if that node though is a builtin node or from a package?

1 Like

Just verified that LinkElement.GetParameterValueByName fails in the same manner.

Thanks for the suggestion, but it failed as well.

That is the OOTB node but LinkedElement.GetParameterValueByName is also failing. Weird that it works in 2.3 but that it fails in an unusual way in 2.6.

Hi @stephengabriel your first node List.GetItemAtIndex have null output, for a valid output maybe try get parameter value as string or unit nodes from Mepover package or Rhythm package

Not quite correct. All are assigned values. Below is the complete graph including the user inputs. I tried upgrading all of the Data-Shapes to the latest versions to no effect. Still generates the errors as shown below.