View.getbytype operation failed

I am trying to get a list of my elevation views so I can input that info into a larger action to set the Z values of my elevation view box.

I have used this on one machine and the action runs no issue. I run this on another one and it it says “operation failed.” What could be causing this issue? Revit version? Dynamo Version? Package version?

Working computer specs
Revit:
16.0.490.0
20150714_1515(x64)
Service Pack 2
Dynamo:
1.3.2.2480
Archi-lab package:


2016.13.4

Not working computer
Revit:
16.0.1185.0
20161004_0715(x64)
Update7 for R2
Dynamo:
1.3.2.2480
Archi-lab package:


2016.13.4

image

Did a null sneak into the list? Can you show the preview of this node, the node before it, and a view of your entire graph?

1 Like

Report this on the Dynamo Github. Its a bug, only I cant determine exactly what causes it. You’ll need to restart Dynamo to fix.

cc @Michael_Kirschner2 - my suspicion is the Document object. If its set to static readonly and the user opens multiple Revit doc’s and Dynamo, then closes the doc Dynamo is attached to, Dynamo attaches to the next open doc - I believe this makes the ‘managed object’ invalid as the Document object isn’t updated. I’ve not been able to reproduce this error consistently though, so the above is anecdotal.

1 Like

I am new to this so I figured out that my package was not the most up to date. Once I updated the archi-lab package, that cleared it up.

User error…

1 Like