How to restart Dynamo from code?


A. Most of my task I do involve deleting and adding new elements but it does not allow me to run open script twice. I have to 1) delete items in first step then close dynamo and open again 2) create elements is there any chance to write in script close dynamo open again same file and run boolean?

B. I am also looking for time wait node that between nodes will wait 1 sek and carry one…however I do not want to use pause as this stop CPU and this is not what I want to achieve, thanks Michal

Having Dynamo restart, hence keeping elements created, is something important. I don’t know a way to do it directly. Reopening the current DYN works, but that needs to be done manually or externally via something like AutoHotKey. Dyno seems to optionally restart Dynamo when running something so it is somehow possible within Revit.

Have you looked at Andreas’ Dynamo Automation?



An interesting project to run Revit/Dynamo via journal files. Are you implying there is some clue to how to restart Dynamo and have its created items committed in there?

Not sure. Just struck me as a possible approach.
It looks as though you can use it to programmatically open Revit, open a particular Revit model, and then run a Dynamo script on that model.
It sounded as though the OP wanted to run the same script twice on a model, so there seemed to be some relevance.
As you say, though, Dyno shows that you can drive Dynamo programmatically from .Net. That’s probably a more direct approach if you have .Net skills.