Load Grasshopper File from Rhino Command

Hi,

Is it possible to open a specific grasshopper file using the command line in Rhino. I have a GH template that I’m using for a lot of projects so it would be cool to be able to type “Template” or whatever I name it in the Rhino command bar and itll automatically load that GH file?

Thanks
Mitchell

A simple command like:
_open “path-and-filename.gh” _Enter
should work.
You can use that in shortcuts, or make a button…

Thank you!

However, this opens up a new Rhino file, is it possible to open it in current rhino file so I dont have a reload the rhino file again as well?

Thanks

uh, you’re right.
Try this script:

! _-RunScript (
Set GH = Rhino.GetPlugInObject("Grasshopper")
Call GH.OpenDocument("C:\Users\user\Desktop\file.gh")
)