algorithmic modeling for Rhino
Hi I everyone, thanks in advance for any tips. I've decided to take my coding abilities a step further, I can code within the grasshopper environement, preferably in VB, and now I've decided to make the switch to C# and to Visual Studio (C# Express to be precise) after doing some basic exercises from the internet (a picture viewer, a basic laberynth game). I've come to the conclusion that the way to go is to start doing GH components and learn that way how to call libraries and interact with other programs in order to in a future be able to write plugins and so forth.
To do this I've started with Ben Sitler's guide to custom components and Im stuck in the the hello world example, I have the following error.
this is the example code
pManager.Register_BooleanParam("Execute", "E", "Execute?", false, false);
and this the error
Error 1 The best overloaded method match for 'Grasshopper.Kernel.GH_Component.GH_InputParamManager.Register_BooleanParam(string, string, string, bool, Grasshopper.Kernel.GH_ParamAccess)' has some invalid arguments C:\Users\nico\Documents\Visual Studio 2010\Projects\ClassLibrary1\ClassLibrary1\Class1.cs 14 5 ClassLibrary1
When I type pManager. the intelisense for register boolean parameter is nowhere to be found, am I missing a library?
I've added all the dll correctly, so I really dont know whats wrong. Any ideas, and also any steps you think I should take to reach the goals expressed in the first paragraph?
Tags:
If you're using the latest build of Grasshopper, this could be the problem why RegisterBooleanParam doesn't show up.
Also, Grasshopper.Kernel.GH_ParamAccess cannot be false, instead you have to provide the type of access with GH_ParamAccess.list (or item/tree).
For example,
pManager.Register_BooleanParam("Execute", "E", "Execute?", false, GH_ParamAccess.item);
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by