Grasshopper

algorithmic modeling for Rhino

Hi Everyone,

I'm relatively new to building custom components in Grasshopper.  I'm at a point where I need some debugging tools to get my scripts to run properly.  I see some documentation on a Grasshopper/RhinoCommon extension for Visual Studio, but I can't find installation/use instructions that are complete and clear to me.

Some previous forum posts suggest that I can just go into Visual Studio and go to tools -> extension manager -> online and search for the extension.  But nothing comes up when I search for either Grasshopper or RhinoCommon - see attached.

I also tried to set it up manually using a tutorial I found here:

http://jramsden271.wordpress.com/2013/07/30/setting-up-visual-studi...

But that process presumes I will be programming in C, although my scripts are all written in VB.

Can anyone get me started with this?  How do I make the link between Visual Studio and Grasshopper?  

Thanks

Zak

Screenshot.jpg

Views: 2714

Replies to This Discussion

http://visualstudiogallery.msdn.microsoft.com/9e389515-0719-47b4-a4...

This one? It should set up the debugger when you create a new project. If you already have a project, then you'll need to set up debugging by hand.

--

David Rutten

david@mcneel.com

Thanks David - I think I have the extension installed but I'm not sure I'm going through the proper steps to create a working .gha file. Right now I'm using this (dated) reference:

http://formecomplexe.files.wordpress.com/2012/04/bensitler_custom_c...

Is there an up-to-date set of instructions for creating a working .gha (e.g. GUID, image, file copying/pasting)? Better yet, are there any open source examples of working Visual Studio Projects that can be compiled into working .gha files?

Not sure about any open-source examples, none of the native GHa libs are available at the moment.

Debugging a GHA is exactly the same as debugging any DLL on Visual Studio. The basic idea is this:

  • Build the assembly (it will be called *.dll). I prefer to build both DEBUG and RELEASE flavours in the same folder, i.e. bin\ rather than bin\debug\ and bin\release\. This makes it easier to load the version you want into Rhino without any collisions or conflicts.
  • Use a build post-process to rename the file from *.dll to *.gha (this is the only step that is different for GHA projects).
  • Have Visual Studio start Rhino.exe when you begin debugging.
  • Start Rhino, run the GrasshopperDeveloperSettings command and add your bin\ folder to the paths whence Grasshopper loads GHA files from. You should only have to do this once as GH remembers those folders.
  • Start Grasshopper. During grasshopper loading, your breakpoints should turn from empty red circles to full red discs. If they don't something went wrong.

The only caveat here is that Visual Studio Express doesn't provide the interface for selecting a startup application for debugging. So you have to edit the project xml file manually to set this up.

--

David Rutten

david@mcneel.com

Thanks David!

ou saved my day with this information. The information for developers is a little bit scattered and thus hard to approach. Especially us who have not been so smart to actually do a minor in coding in university and have had to start from scratch now that the subject has proven to be really useful. Anyways keep up the good work.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service