The Case of the Invisible Dynamo Nodes

Lately, one of my Dynamo students reached out to me in panic – all his Dynamo nodes were invisible! Running the script worked but no nodes were visible in the graph view workspace. Create a new node and that one was visible until you right-click and do Fit to Screen – then it’s all white and lost.

A quick google search didn’t really amount to anything but then I remembered how fun it is in normal Revit or even AutoCAD when you create something far, far away – zoom extents will show nothing (although in AutoCAD you usually at least see a tiny dot somewhere).

It seemed impossible to select any nodes with a window so I tried CTRL-A (select all nodes), trusted in the Force and tried Edit/Clean-up. Didn’t work.

Apparently Dynamo thought the script was pretty cleaned up already. So I tried Align Selection – Bottom and there it was! Just all nodes aligned bottom….What a mess. Also, it was making Dynamo really unstable – it kept crashing.

I tried some different Align settings (well, I tried all of them)…

Not much better. Sure, I could send this back now and tell him “Good Luck, just clean it up” but thought there must be a better way.

Dynamo script files are in later versions of Dynamo just JSON text files – you can open the dynamo script with your favorite text editor and even do some creative editing there, instead of in Dynamo itself. In the file are all the nodes, all their settings, connections and most interestingly – their coordinates.

So I could just go through all the nodes, check their coordinates and find the offending one – maybe there was only one node somewhere far away? Unfortunately my student was working on quite a gigantic script and it was friday, I simply didn’t have the time to check all the nodes in Notepad++.

But I realised that Dynamo can also read JSON -there’s a builtin function called Data.ParseJSON and you get a dictionary object in Dynamo. So with a very simple little script I could find the very same information I saw in Notepad++. The X and Y of that Circle node.

So getting the View and then the NodeViews I should be able to get the X and Y which of course is a good starting point for a Dynamo Point.ByCoordinates and a cloud of node coordinates in Dynamo! Doing Fit to Screen on the points turned out to be really bad idea – there was something far away which crashed the background preview….

Then using a simple distance measurement from the Point.Origin to the node points, quickly an offending Code Block node soon appeared! 170.000mm from 0. Or, X=-84489 instead of the other’s -1500 or so. Nasty!

Only thing left was searching for X 84489 in Notepad++ and change the number to something more like the other nodes, Save and Open again in Dynamo and my student was soon back struggling with trying to fulfill his teacher’s crazy demands on his graduation assignment!


Another reason why you get invisible nodes could be that you are using an older version of Dynamo (for example in Revit 2020) and the script was last saved in a later version. Seems to especially happen if you have used CPython in the newer version.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to Top