View GH definitions without launching Rhino and Grasshopper

Is there a way to view GH definitions without launching Rhino and Grasshopper?

There was a thread about this a while ago. If I remember correctly, there‘s no way.

Yes and no. There’s certain information you can harvest from a gh file, but not component icons or special component display styles (such as sliders, or toggles, or buttons, or panels, or quickgraphs, or …). You’ll also have trouble figuring you modifiers such as Flatten, Expression, Normalise, etc.

The file will contain the names of objects, their bounding rectangles and their connections. If you’re willing to do a fair amount of parsing you can even deconstruct components to a degree.

There’s two problems when trying to read GH data:

  1. Every object is allowed to store itself in whatever way it sees fit. There are no strict rules, or even guide-lines that lay down schemas. Of course most objects are either components or floating parameters or a few special cases like panels and sliders, so if you want to handle them you can.
  2. The information for an object in the file is partial. A lot of information is supplied by the loaded plugin at runtime and is not stored in the file at all. Icons are an example of this.

Isn’t it possible to strip GH from everything but the canvas. Since it’s just the definition you wouldn’t need the link to Rhino. Just the components with their links in a read-only mode.

This could be a good way for show of how complex your definition is to a potential customer without showing them the result.

Or another level, make Rhino a plugin for GH instead how it is right now. :stuck_out_tongue:
GH with a simple perspective viewport from Rhino

Indeed the ideal would be as in the Windows explorer when the mouse passes on the GHfile an image and some notes of my last session appears.
Like all the 3dm files.

1 Like

Hmm that should be easier to implement, since inside GH it already has sneak peak functionality.

But I thought the original post was about actually browsing through the whole gh definition and seeing all components.

Rhino is needed for computing solutions, in order to view the file what you need is to load the Grasshopper plugins that define those components and parameters. Embedding GHA files is technically possible, just as embedding fonts in PDF files, but it can get pretty complicated if a plug-in requires more than just a single GHA file, or has a license agreement, or relies on other installed applications.

I’m (re)designing the file format for Grasshopper 2.0 right now, so actually adding some information to it which would make it easier to draw a preview of the network is something I can do, but you’d still wouldn’t be able to really replicate the look of objects with custom attributes.

Another thing I’m doing now is including bigger thumbnails of both the canvas and the active Rhino viewport. Of course whether those images are useful depends on whether the canvas and viewport were looking at something relevant when the save happened.