How to run code when dynamo is still starting

Hey guys,

I need to know how to call some code when Dynamo is still starting.

I have done this in grasshopper (similar to dynamo) like this:

  public override GH_LoadingInstruction PriorityLoad()
     Grasshopper.Instances.DocumentServer.DocumentAdded += DocumentAdded;

     var directoryToCopyUpdates = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) +

     return GH_LoadingInstruction.Proceed;

The trick here was that if any package contains a overwrite of PriorityLoad function that is called before grasshopper starts.

Hi @Ricardo.Farinha

You can do this via writing an extension. It’s relatively easy and you can find info about how here…

Hope this helps,


1 Like