Grasshopper file commandline argument for Rhino

We can already launch rhino and specify the path to a 3dm file to load.

I would like to also be able to specify a grasshopper file as well.

I don’t care if rhino uses the file extension (.gh) or a -G flag to know which kind of file is which.

I would like to be able to specify both the 3dm and the gh file and have rhino load the 3dm file first then run grasshopper and load the gh file.

This is a startup string I use in VS, it may work also for you:

/nosplash "rhino_filename.3dm" /runscript="-grasshopper solver enable load document open gh_filename.gh _enter"

// Rolf

That is indescribably awesome!!!

Thank you :slight_smile:

Hi @RIL, do you know why this is not working? (i’m working with powershell)

Start Rhino.exe -ArgumentList /runscript=“-Grasshopper solver enable document open SE_grasshopper.gh _enter”

Rhino is launched ok, but it wont open the grasshopper file
image

Btw, is there any place to consult which commandline arguments are available for “Rhino.exe”?? thanks!

Do you have any suggestions for handling a file path with space using this method? My file path is as follows:
G:\My Drive\02_Professional Files\_Repositories\Rhino Circular\RhinoCircular v1\Documentation\Rhino Circular Examples.ghx

Try putting it in quotes:
"G:\My Drive\02_Professional Files\_Repositories\Rhino Circular\RhinoCircular v1\Documentation\Rhino Circular Examples.ghx"

I try to avoid making paths with spaces in them, if I can. Because they are a pain :slight_smile:

This doesn’t work because we are already inside a set of double quotes.

I have tried single quotes as well so the full command reads as follows:

/nosplash /runscript="-grasshopper solver enable load document open 'G:\My Drive\02_Professional Files\_Repositories\Rhino Circular\RhinoCircular v1\Documentation\Rhino Circular Examples.ghx' _enter"

This does not work either.

They definitely are a pain. I also try to the avoid them. However, sometimes they can’t be avoided. This is a great example because I’m reading a file from a google drive and the google drive has a locked path name that uses a space “My Drive”. It can’t be avoided.