Grasshopper

algorithmic modeling for Rhino

C:\dev\grasshopper\1.0\root ... how to install Grasshoper SDK?

I'm trying to develop a component with Grasshopper SDK (PC - Window 7 64bit - Rhino 5 - Visual C# 2010 express and wizard). 

The first one works well, I have big issue with the second one. When I try to use it, the system displays

When I debug with Visual C# 2010 express , it asks me for several .vb files...

Where are they, or which step of the installation I have missed to have this errors?

Thank you

Serge

Note: I understand I have an issue with the DataTree I'm trying to create. But it doesn't mean I haven't an issue also with the tools to develop new components.

Views: 790

Attachments:

Replies to This Discussion

Hi Serge,

the Grasshopper SDK is Grasshopper. It's the same files. When you want to debug your GHA library, you should make sure that your library is loaded directly from disk rather than via the memory.

You can use the GrasshopperDeveloperSettings command to switch off COFF loading. If you've done this and you're still getting these requests, let me know.

Incidentally, Grasshopper is not open-source so you cannot get any *.vb or *.cs files. However we do ship and install the pdb files needed for debugging.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thank you David,

First, the error disappears as soon as I correct the RegisterOutputParams! I used Register_PathParam and tried to output a DataTree. 

Switching off the COFF is going to help me. I missed this one and until now, I was bringing my .gha in the Grasshopper window, then unloading Grasshopper to load it again! That is just to really demonstrate that I know how to develop something but that's not my job within my organisation. 

So no c:\dev\grasshopper ... That's a good news, I already have enough with my own code ;) Nevertheless, I must say that I would be interested in reading for each class an example exposing how to use it. But that must be a lot of work and what we have is already great.

Thank you

-----------

Serge

After several tries, I'm back with COFF checked. When I switch it off, the breakpoints are not working! 

That is very strange. When the Memory Load option is checked, it means that the GHA file is first loaded into RAM as a byte-array, then loaded from RAM. This gets around certain loading security issues, but it's not a good idea when you want to debug. I suppose if you're hitting breakpoints you're all set, but I do find it strange.

Note that you cannot output a DataTree from a compiled component. You need to create a GH_Structure(Of X), where X is any type that implements the IGH_Goo interface (say, Grasshopper.Kernel.Types.GH_Time).

Then you must use DA.SetDataTree() instead of DA.SetData().

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Terribly sorry, but I cannot explain why it's like this. What I can say is to test the breakpoint I have one on the constructor of the component. Of course when Grasshopper loads, it blocks the process and I have to continue for Grasshopper to resume. With COFF off I have never been able to have this breakpoint on the constructor active. 

Ok I would have to go the right way. For now I use a GenericParameter and then SetData. It seems it works. At least I don't have any error. But I will try to understand how to create a GH_Structure of GH_Time and correct my code (but not right now, it's time to go back home)

Thank you very much for the help.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service