New Grasshopper 2 Visual Studio Plugin Template

Hello all,

Last week, I co-ran a set of Grasshopper2 workshops for the AEC Tech Conference in NYC. The afternoon session was focused on the development of G2 plugins. I published a simple Visual Studio project template for the participants to use.

To install:

  1. Download the template archives above (.zip)
  2. Place the ZIP files in your Visual Studio template locations (do not unzip!)
    1. Projects: %USERPROFILE%\Documents\Visual Studio [VERSION]\Templates\ProjectTemplates
    2. Items: %USERPROFILE%\Documents\Visual Studio [VERSION]\Templates\ItemTemplates
  3. Start Visual Studio and choose to create a new project, search for the Grasshopper2 template.

These two templates are for making basic Grasshopper2 component nodes and will provide some guidance on:

  • Registering your plugin information
  • Defining a component class with inputs/outputs/processes
  • Debugging configurations for Rhino 8 and 9

Very basic but hopefully can help orient others to coding new plugins for G2! If you have ideas or want to extend the project, feel free to fork and submit pull requests to the project.

(Note: Grasshopper2 is still in alpha so a lot is still subject to change.. thanks to David for all of his amazing work on this)

Cheers!

-Nate

6 Likes

Very cool @archinate1! I hope AEC Tech was fun, I missed it this year.

Out of interest, have you tried the existing GH2 plugin templates in the Rhino.Templates project?

Hey @CallumSykes - Oh neat, I wasn’t aware of the Rhino.Templates repo.

I did some searching: is this it? Seems like another good option: RhinoVisualStudioExtensions/Rhino.Templates/content/CSGrasshopper2 at main · mcneel/RhinoVisualStudioExtensions · GitHub

That’s the one! I think I even wrote guides, but not sure if they’re public yet.

1 Like

However, I noticed that the templates in the Rhino.Templates repo might need updating for the current state of GH2 development. Since GH2 is evolving rapidly (now in WIP9), it would be great if the official templates could be updated to reflect the latest API changes and best practices for the current WIP version.

Good idea. I’ve created a ticket → https://mcneel.myjetbrains.com/youtrack/issue/RH-90600/Update-GH2-Templates-to-latest-nuget