Grasshopper

algorithmic modeling for Rhino

Guide to creating custom grasshopper 0.6.X components

People might find this useful.  Please do let me know if you find any errors or omissions.

Best regards,

Ben Sitler

Note: on 2/4 at 13:00 I updated the manual to reflect the discussion on where to locate components on the Grasshopper ribbon.

Views: 19303

Attachments:

Replies to This Discussion

Ive played around for 2 hours now on the compiler project settings. Need to get a breather.

Some things ive played with are macro settings in the post build dialog box so I can rename the .dll to a .gha file. Its given me head aches. I think I have to del a file before I can rename it as we cant overwrite using the rename syntax of the macro.

See http://stackoverflow.com/questions/606652/how-can-i-create-differen...
I can launch rhino when debugging but the probem for me is how do I get GH to point to the debug .dll/.gha file? If I copy the debug .dll to the components folder how can the VS IDE locate the debug file in the components folder if it is expectng to look in the default bin/debug folder for the .pdb files?

ok, off out now.............
Hey Steve,

Hope this might help. This is the post-build line I have in Visual Studio (you need to manually edit the text file in Express) to copy my compiled dll into the Grasshopper folder. Adjust if necessary:

Copy "$(TargetPath)" "C:\Program Files\Rhinoceros 4.0\Plug-ins\Grasshopper\Components\$(ProjectName).gha"

Cheers,

Jon
Hi,
Does anyone know what this cryptic message mean? I'm using Visual Basic 2008 Express edition. I'm trying to get debugging to work and it's giving me this error.

"There is no source code available for the current location"



Thanks.

kermin
Hi David,

Is there any advice for what to try if GrasshopperDeveloperSettings command just returns unknown command, I can see in the dll using reflector. I'm a bit puzzled why it's not recognized.

Cheers,

Jon
Jon, I noticed that in Rhino 4 I needed to run 'Grasshopper' first, then the command is available.

Try that...
luis
Hi Luis,

Thanks, that's exactly it. Now you mention it, I remember David stating this (or similar) in a reply earlier to a different posted question.

Cheers,

Jon
Ok. Finally sussed it. What a pain. Im using VS2008. Jon/David thanks for your input.

So

1. Assuming we are in debug mode, Project> Properties > Compile>Build Events

OK
copy "$(Targetpath)" "yourprojectnamehere.gha"

This is entered in the Post Build Command line. As per Ben's instructions.

2 Project > Properties > Debug > Start External program

Set path to Rhino4.exe

As per David's instructions

3 Launch Rhino, type

_GrasshopperDeveloperSettings

Then uncheck Memory load, and set path to your debug file location used by the VS2008 IDE

This is as per David's instructions

4 Tools > Options

Check Show All Settings on bottom left hand corner of dialog box

Select Debugging tree node

Uncheck

"Require Source files to exactly match the original version"

VIOLA, you shoudl be able to debug now in VS2008.

cheers
Thanks a lot!
I succeeded in debugging with VS2008.
But with the same setting, it fails with VS2010.

Is there anyone who knows why?

(I'm using GH V0.7)
Hi everybody!

First of all, thanks for your work, Ben.

Sangsu, I tried on GH0.7 and it didn´t work (not completely sure I didn´t make any mistake) but it did on version 0.6.

Is that right or should it work on both versions?
Hi Sangsu,

about "Require source files to exactly match the original version". I had this once, it meant that the loaded .dll is not the one that VS is debugging. Check that the path to load the .dll is updated and is working.

Hi Miguel, what error are you getting?

- Giulio
The VS2010 debugger requires the DotNET 4.0 framework as far as I know. Rhino4 never loads DotNET 4.0, Rhino5 has a hidden toggle for this (TestDotNetRuntime command).

We were running into problems with VS2010 across the board and Steve has only this week (last friday in fact) added more options and more smarts to Rhino5 in order to facilitate debugging under VS2010.

We recommend you stick with VS2008 until we've got this all sorted out.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
i can definitely second this. i had the biggest headache trying to compile and debug under vs2010. it just threw error after error. as soon as i switched back to vs2008 all things worked perfect.

i did try the TestDotNetRuntime and still was not able to compile a gha with .net 4. it would be nice to allow this since i think PLINQ and the parallel library will be a game changer. i have written some stuff for GC using it and it is wonderful to watch all 8 cores churning away! i know this can be done the old fashion way but with the simple code i am writing using PLINQ will almost grantee that it will be completely thread safe and optimized.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service