Link Grasshopper files to Rhino Drawing?

Is there some way to attach or link Grasshopper files to a Rhino Drawing, so that when I open the Rhino drawing and want to use Grasshopper files that were tailored specifically for that drawing, I don’t have to remember what the Grasshopper files were called or where they are. I don’t necessarily want to open Grasshopper every time I open the Rhino Document, but when I do want to open one it would be handy if they were linked to the drawing somehow.

Is there some way to do this?

If a Rhino file is necessary, I like to name it the same as the Grasshopper document and keep both in roughly the same location and vis versa. This way there’s already a visual link in terms of filenames.

Examples:

Projects
    ├  yyyymmmdd_some-project
        └ some-project.3dm
        └ some-project.gh
Projects
    ├  yyyymmmdd_some-project
        └ some-project.3dm
        └ some-project_main.gh
        └ some-project_other.gh

You could potentially automate opening the appropriate files with scripting or probably even a macro, but you’d have to keep track of what files belong together, which could be rather tricky.

1 Like

Hi James -

Doing it the other way around is straightforward. You can import a 3dm file in your Grasshopper definition and can “hardcode” the path and name…
-wim

Grasshopper can’t be opened without loading Rhino first though.

That’s no longer true. I’m not sure if there’s a setting to allow it, but since 7 (maybe even 6?) double clicking on a grasshopper file opens rhino grasshopper and loads the file.

Opening Grasshopper with a Marco that opens the correct grasshopper file seems to work pretty well. I made a button on a custom toolbar that does:

_-Grasshopper
Document
Open
x:\MyFile.gh

I’m curious if there is a way I can make my Rhino file automatically show a particular toolbar when I open it? I know there is a toolbar command that can show the toolbar, but is there a way to autorun a command when I open a Rhino file that is specific to that file?

I suppose so, yes. You could have “something” in your Rhino file (e.g. a document user text key pair, or a specific name for an object on a specific layer, etc…) and have a start-up script check for its presence.
-wim

Yes, but Rhino still launches first (or in tandem).

1 Like