Grasshopper

algorithmic modeling for Rhino

Is there any published guide on the way .ghx files are formatted?  Its a great trick I use with max/msp for dumb, but large patches - where I just write a script in python that creates the patch as a text file in the correct format.  I notice that .ghx files look very xml based, but I didn't know if the format was published somewhere.

Views: 2388

Replies to This Discussion

Hey Nick,

a .ghx file extension is essentially a grasshopper xml file (which is why it looks xml based).  I don't know if the file formatting instructions have been put online, but perhaps David could provide some insight as to his methods for creating the file structure.  As of GH 0.8.0050, the default file format has changed to .gh which is a binary file format... which may (or maybe not) make it harder to parse. The binary format is much more compact, and doesn't get mangled by web browsers when they are downloaded (as sometime the xml file format would get messed up because different browsers would handle XML files differently).  The downside to the binary format is that it's harder (if not impossible) for us to read, whereas XML is much easier.  I could be wrong on some of those points, but I believe those are correct.  Of course, David could provide much more insight.

HTH,

Andy

Hi Nick,

 

ghx is indeed xml, but gh is a binary format. You may want to use the GH_IO.dll to parse gh and ghx files. GH_IO.dll will expose the grasshopper file format as a hierarchical and type-safe structure. There is no xml schema that validates a grasshopper file.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service