Automatically load Grasshopper file after opening a Rhino document

Hi Everyone

I want to have a button in my HumanUI interface which would open a certain Rhino file and then automatically load a grasshopper definition into that file.

At first I tried simply staring a grasshopper file where I had a script with a Rhino command opening the needed 3dm. It worked ok until the grasshopper definition became heavy and now it seems to solve everything in an empty file and then do it all again in the correct file.

I thought that some kind of ‘GrasshopperDocumentOnLoad’ event would make Rhino file load before everything else but I couldn’t find such event.

Then I thought maybe there is a way to start Rhino.exe process with some parameters (like -filePath and -GrasshopperFilePath. Does anyone know if it is possible?

I also know there are startup macros in Rhino itself but it seems you need to manually add the path to such macro in Rhino Options.

Any ideas on that matter would be much appreciated.
Max