When enabled, the script parasite component watches the C# component it’s grouped with, and writes the changes to the file [Nickname].cs in the selected folder. By default this is the folder “GrasshopperScripts” in my documents.
- Add the script component in a group with the C# component you want to edit
- Set enabled to true
- Head over to your My Documents\GrasshopperScripts
- With Visual Studio Code: Open the folder.
- With Visual Studio Community or Rider, open the GrasshopperScripts.csproj file.
- That’s it!
- An IDE. If you have none installed I recommend you Visual Studio Code (free, also works for the Mac)
- In Rhino make sure COFF loading is disabled, or set the loading mechanism for the ScriptComponents is set to Disk in "File > Preferences > Solver"
The folder that is last successfully written to will be saved as the default export folder for all future times you use the component.
If the folder does not contain a .csproj file (used by Visual Studio, Visual Studio code, and all C# ide’s), a new csproj file is created for you with the correct references to Rhino and Grasshopper.
Watching for changes
The following changes to the component are synced and written to the C# file:
- Added parameters (input/output)
- Changed parameter name (input/output)
- Changed parameter type and list type (input)
I’ve tested with Visual Studio 2017 (needs a bit of a recent update to work with the new csproj format), Visual Studio Code, and Rider.
Grasshopper for Mac
It's currently untested for Rhino for Mac. Please let me know if you find out if it works or if it does not work.
Source code / Licence / Contributing
The plugin is open source (MIT Licence) and available on Github. If you have suggestions or improvements, throw me an email, or send an issue/pull request on github, and I'll get back to you.
- Sync back code changes done in the grasshopper editor
- Better support for syncing component renames