Info for gha file creation

Hello everyone, I’m going to launch my first grasshopper plugin on food4rhino very soon. I’m creating all the components with clusters and password exported in ghuser files, but I’d like to publish a gha file.

Do you have some documentation about how to do it? What is a gha file? How can I create it?
Maybe it’s simpler than I think. I’m trying to understand it from the web but I am disoriented.

Thank you

This functionality has never existed officially as far as I know. Maybe it can be compiled with some relative new tool, but it is not what the native software allows you to do. That’s why you haven’t found any information and why there are still plugins distributed as a collection of UserObjects.

A .gha (grasshopper assembly) is a programming library (.dll) readable by Grasshopper. It can be created by code and compiled for example in Visual Studio (I think there is a way to compile python scripts into a gha using McNeel tools, not sure though).

I think you will have to distribute your plugin as a collection of UserObjects.

I’m wondering if the new Hops feature might be an approach here (i.e. as an alternative to distributing UserObjects, which was never really a good solution):

https://developer.rhino3d.com/guides/grasshopper/hops-component/

Not in its current state (v0.4.7), or at least it has the same problem of having to distribute many (.gh) files and has disadvantages. But maybe in the future, it would be interesting to be able to host tool definitions online (or locally) and be able to use them as commands in rhino and components in GH, from a special file that stores the path and metadata of each tool.

1 Like