Grasshopper

algorithmic modeling for Rhino

Hi all,

 

this is the first release of the Grasshopper assembly wizard, to start new assembly development in C# and Vb.Net more simply.

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

 
Includes the sample code for an Archimedean spiral and:

  • C# Add-on - Provides a C# project with a GH_Component-derived class and a GH_AssemblyInfo-derived class.
  • C# Component - Adds a single component class item.
  • Vb.Net Add-on - Provides a Vb.Net project with a GH_Component-derived class and a GH_AssemblyInfo-derived class.
  • Vb.Net Component - Adds a single component class item.

 

- Giulio
_______________
giulio@mcneel.com

Views: 11054

Replies are closed for this discussion.

Replies to This Discussion

I'd like to add that (although we do mention this on the wizard page as well) this is for Rhino5. If you want to make GHA files that run on Rhino4, they need to be compiled against .NET 3.5 or earlier.

With a bit of luck it won't be long until Rhino5 ships though and at that point Grasshopper will drop support for Rhino4, switch over to .NET 4.0 and this horrible multi-version-SDK nightmare will be over.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

This wizard currently produces projects that targets .Net 3.5.
I'll be happy to update it when necessary.

- Giulio
_______________
giulio@mcneel.com

So can I use it for rhino 4 or not ?

Hi Mateusz,

Visual Studio 2010, when targeting the 3.5 runtime, can produce GHA libraries that load and run in Rhino 4 but it does not debug libraries in Rhino 4. So it's fine for your users, but you are probably better off developing with Rhino 5 if you need the debugger.

If you are absolutely bound to Rhino 4, it might even be possible to debug, by letting VS know in advance that Rhino 4 only loads the 2.0-3.5 runtimes. You can maybe try the solution outlined here.

- Giulio
_______________
giulio@mcneel.com

Oops, sorry. So yes, you can use it for both Rhino4 and Rhino5. Clearly Giulio improved it after we last talked about it.

Thanks Giulio, great job!

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thanks David -- yes, as long as poosible, the wizard switches to .Net 3.5 just before finalizing the project.

- Giulio
_______________
giulio@mcneel.com

Hi Giulio,

Really nice tool, eager to try. I've downloaded the plugin but since I'm using only Rhino4, I could not get pass the point of selecting the Rhino5 for debugging. I can live without debugging, is there a way I could make it work?

Do I just select Rhino4.exe?

Cheers

Victor

Hi Victor,

the wizard can finalize by selecting the executable of Rhino 4, but then debugging wont work and that is a pity.

There is really no other simple way to make debugging work in Rhino 4 with VS2010. So for debugging, so you should really download the Beta version of Rhino 5 for free from here.

Thanks,

- Giulio
________________
giulio@mcneel.com

Hopefully we can all work on 4.0 soon and 3.5 will be skipped. The Rhino4 sdk is really outdated, but the light shines bright. I hate this questions ... can you compile against 3.5.. a but i have to make a damm workarround...

When opening the sample I got the following error:

Warning 1 The primary reference "Microsoft.CSharp", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v3.5". To resolve this problem, either remove the reference "Microsoft.CSharp" or retarget your application to a framework version which contains "Microsoft.CSharp". MyProject1

but when I just delete this reference everything seems to work fine.

A great tool to have - thanks!

Thanks Daniel, this is fixed and, just in case you need this in the future, there is an update.

To install it you can either download and open the new GHPackage.vsix or:

  • from Visual Studio, choose Tools -> Extension Manager
  • choose Updates, then install the ones that are available

Thanks,

- Giulio
_______________
giulio@mcneel.com

Thanks a lot!!!...I've make some custom profiles for myself, but this is a great help for everybody that is written GH components in VS.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service