Hello World - I'd like to be able to access the Grasshopper Panel (sliders) and the 'bake' function via vbscript. It would be cool if there were some methods that could be written, or at least the provision for access to these options through Rhino's command line. Any thoughts?
this is certainly possible, plugins can expose functions via RhinoScript. How would the functions you want look?
All objects in Grasshopper have an ID (just like Rhino), so you can securely access a slider. But how would you know the ID? Do you need something akin to Grasshopper.GetObject ?
Thanks for your response, David. Let me think about it and I'll get back to you. How familiar are you with Generative Components? I'd like to do in GH what I could do in GC, using C# (with the previously mentioned goal in mind). There may be a way to do it the other way around, using VB inside GH, I'm just not sure...
What if you made a function similar to Rhino.GetPlugInObject that would read something like Rhino.GetGHslider ("Name_of_Slider",LL,UL,POS). Input: [1] the name of the slider, [2] the lower limit,
[3] the upper limit, [4] the slider position.
What do you think?
Matt
Radlab, Incorporated
25 Drydock Ave, Floor 6
Boston, MA 02210
W| radlabinc dot com
E| matt@radlabinc
P| 617.440.3588
Dim GH : Set GH = Rhino.GetPluginObject("Grasshopper")
Dim idSlider
idSlider = GH.FindObjectByName("my_special_slider_name")
If (IsNull(idSlider)) Then Exit Sub
GH.SetSliderValue(idSlider, 0.0, 1.0, 0.25)
I cannot add functions to "Rhino." since RhinoScript is a different plugin that can be installed whether or not Grasshopper is installed. Thus, all I can do is offer another object, which exposes methods that allow you to interact with Grasshopper via the Rhino.GetPluginObject() method.
For sure! I think it will help enormously with exploring/studying/animating parameter combinations.
Hey Luis, you're with LAN, right? I've been teaching a Design Computing and Digital Fabrication course at WIT (http://designcomputing-wit-fa09.blogspot.com/), and through that I've gotten to know Aaron Willette a bit and learned more about what you guys do. He's a good guy. If you're in Boston any time soon it would be great to meet you and have you over to our office.
Matt
Radlab, Incorporated
25 Drydock Ave, Floor 6
Boston, MA 02210
W| radlabinc dot com
E| matt@radlabinc
P| 617.440.3588
this is technically possible, though there are no easy-access-methods for this type of stuff in the SDK. Also, modifying the definition WHILE the definition is solving itself is a very bad idea, which is why all this stuff is so hard from within VB and C# script nodes.
We are currently making a definition with dozens of potentially redundant sliders the inputs of which get trimmed off relative to a number of other inputs. just being anally retentive about them being there.
What would be cool is if there was a slider component where you define how many sliders there are. a bit like increasing/decreasing the inputs to a stream gate or a vb item.