it knows how to do that. Vanilla Claude does not know how because many of the detailed internals of the .gh file structure are not generally available, and some of them are not available at all. I spent about 3 days with Claude helping it identify those details needed to enable it to build a working .gh file.
The process was both laborious and tedious: I gave it a prompt; it tried to make a .gh file; on loading the file GH gave an error message; I gave that to Claude; it fixed that error (I have n o idea how it did this) and made a new .gh file, GH gave a new error message, etc. etc.
Finally Claude made a.gh file that GH could load and that functioned OK. The reason Claude could do that was it kept track of all the updates and changes it made to it’s method. All of that data is in the attached text file below.
So to have Claude make a working .gh file follow these steps:
- Make your Claude prompt as detailed and specific as possible. That means tell it what you want your .gh file to do. If you know what they are, tell Claude the GH components you think it should use. Save this prompt in it’s own text file so you can up load it in Step #2.
- Start your Claude session by telling it you want it to make a working .gh file for you to use. Tell it you have some data it will need to do this, as well as your prompt. Then upload the file included below and your prompt as 2 separate text files.
- That should be enough for Claude to do it’s thing. What it will give you back is a text file that is a Python script that you run with Rhino’s _RunPythonScript command. (What’s that _ for anyway?) Rhino will use the script to produce your .gh file and save it on your desktop. (Remember to change the type of the text file from .txt to .py.) Rhino gives no feedback when it does this - you have to find the .gh file on your own.
- The .gh file should load and operate OK. It will likely have some cosmetic problems like crossed wires, GH components placed too far apart, etc. This is partly because my GH monitor has a large 4K screen and Claude used those dimensions to set up how it places things on the GH canvas, and that data is (somewhere) in the attachment below.
- Consider the fact that the first .gh file Claude generates will probably not be exactly correct, so be prepared to resubmit the changes you want Claude to make, and repeat steps 3 & 4.
I think the combination of this method to get the .gh file created followed by tweaks made with Raven will go a long way in reducing the time it takes to get a .gh file to produce exactly the results that are needed. Below is the text file CLaude needs to create a working .gh file.
Claude_GH_Gen_Data.txt (5.9 KB)