Kill run

Is there a way to kill a script if it is taking too long to run?

Task Manager (hope you’ve saved your RVT and DYN, first)

This is a real problem. I’ve often forgotten to synchronise my model first. Hopefully I’ve learnt my lesson.

This would be a nice feature indeed. Some nodes will also go into an infinite loop when run in automatic mode, e.g Wall.Flip from Clockwork. It would be nice to swich back to manual after it has started to run.

Have anyone posted this as an improvement at GitHub? https://github.com/DynamoDS/Dynamo/issues

It happens to me sometimes I will Hit Esc several times. It will stop running script.

@Kulkul Do you hit Esc in Revit or Dynamo? If you have a command active in Revit, Dynamo won’t be able to run before that command is canceled. Then it will work with Esc.

Don’t know if its Revit or Dynamo :confused: I just Hit Esc it works tho :grin: No command is active in background.

@Kulkul Are you running the Dynamo revit addin or the Dynamo stand-alone?

Dynamo addin

Hitting escape doesn’t seem to work for me and I’m using the same. It’s weird, but I guess I will just have to remember the synchronise button for the time being.

:grin: Dude its not neccessary that it will work for all the PC’s. It depends upon system configuration. I am using Asus Gaming machinehttp://www.asus.com/ROG-Republic-Of-Gamers/ROG_G20AJ/

Haha, that makes one of us. Only our bim manager and max renderers have such machines!:disappointed_relieved:

It would be nice to have a feature that would optionally save the RVT and/or DYN before each run. Visual Studio saves one’s whole solution on each compile and that makes sense.

Until then, it’s CTRL-s all day.

The .dyn is actually saved before each run (in manual) , check the backup folder.

[quote=“Einar_Raknes, post:14, topic:4534”]
The .dyn is actually saved before each run (in manual)
[/quote]Good to know

Good to know @Einar_Raknes. It is such a hassle to have to force shut down and then reboot.

Maybe I was wrong about backup before each run, but Dynamo saves a backup each 60000ms = 1 min. This can be changed in %appdata%\Dynamo\1.0\DynamoSettings.xml

  <BackupInterval>60000</BackupInterval>
  <BackupFilesCount>1</BackupFilesCount>

Hi,
Just had the moment of infinite spinning terror, and then the best thought after.
Put a prefix node group that uses the node -> Document.SyncroniseWithCentral from #clockwork and have it run before the rest of the script does node -> Passthrough also from #clockwork
That way at least you always have your work saved before the risk of a loop or crash.
For small projects this should be fine as long as you are working in a local file and the central model on the server.
Anyone got any thoughts on how to do this with a little bit of code instead? :wink:

1 Like

On bigger jobs in a workshared environment that would be a nightmare as you would have to confirm no one is syncing before running the script… anyone know how that node handles a synchronization error?

1 Like

Use task manager, but don’t kill Revit, just kill dynamo. its name appears like nwjs with the dynamo run icon. It stop running and revit continue working