Wiki
Clone wikiGhToGhx / Home
Home | Console | Batch Script | Commands | Next>>
GhToGhx - A Grasshopper Conversion & Compression Tool
Table of Contents
GhToGhz is a CommandLine tool for converting Rhino Grasshopper files (.gh) to XML (.ghx) and, optionally, compressing the XML to GZip format. By converting to Xml/.ghx the Grasshopper definitions can be made "searchable" to external search tools. GhToGhz can convert and compress entire folder structures in one go, starting from a folder provided as the first commandline argument. GhToGhz compresses the xml (.ghx) format into gzip. GhToGhz never modifies original files, it only produces copies of files and it also creates and removes temp folders for these files.
The tool can be used interactively (pictured) or called from a batch script like so:
.\GhToGhx.exe "D:\Grasshopper Folder\More Folders\"
Fig 1. In the Console Window the command options options are always displayed:
Grasshopper's ghx file format is essentially a xml file format which is searchable (although Xml isn't fully optimal for code inside Script Components) and plain xml is also suitable for being stored in version control systems (VCS). Moreover, diff tools can spot differences between saved versions.
Some search tools can search zipped files directly (for example PowerGrep) and for this reason the tool supports compressing the ghx/xml files into GZip format. Also the copmpression tool operates recursively on entire folder structures.
COMMANDS
See separate pages with a listing of all available commands
INSTALL
If you are installing a compiled exe-file (see download link below) you can quickly get started by following these simple steps:
- drop the exe file anywhere on your harddisk,
- then - if need be - remove any fake file extensions)
- place your own copy of the file GH_IO.dll in the same folder as the exe file. GH_IO.dll typically reside in the following folder under Rhino6: C:\Program Files\Rhino 6\Plug-ins\Grasshopper
- now the program should work.
DOWNLOADS
A compiled version of the GhToGhx.exe can be found on the Downloads page
SOURCE CODE
The source files are available here at Bitbucket GhToGhx.
LINKS
See also related forum posts on McNeel forums on this subject:
Updated