generative modeling for Rhino
I want to build GH forms with customized xml string:
I want to know if it is possible to use the class GH_Slider, GH_TextBoxInput, ... in a GH_Component ? Or a GDI+ controls library
I'm confused. I don't see the immediate connection between "GH", "forms", "xml", "GH_Component" and "GDI+ controls library".
Are you trying to create a System.Windows.Forms.Form using Grasshopper interface elements (such as the colour picker, digit scroller or slider)?
Are you trying to create a new IGH_DocumentObject which is located on the Grasshopper canvas and which has a customized interface (such as Text Panel, Number Slider or Boolean Toggle)?
Are you trying to generate this at runtime from xml, or at compiletime?
I'm French and I was a bad student in English class (sorry).
I am a designer in architecture. I make models with stereolithography.
use Grasshopper to develop my own automation.
My problem is with great descriptions in Grasshopper.
I use cluster but the number of parameters entering makes the definition unreadable.
I want to combine the parameters, functions and cluster in this: (Like blender nodes).
If possible, I would create this interface from an XML definition.
I am a beginning programmer and I would like to use GH controls or an external library.
I can not find much help on GH programming on the internet.
Ok, I think I'm starting to understand. The bad news is there's nothing in Grasshopper that does this, or even half of this. So someone is going to have to spend a lot of time writing a lot of code.
Grasshopper UI is fairly modular, so at least it's not a from-the-ground-up job, but obviously making an interface that is created on the fly will be more work than a hard-coded one. It is possible to override the way components look and behave. The Gradient and Legend objects are good examples of this. They are regular GH_Component derived classes but they override the display and layout and mouse events. But there's no 5-sentence introduction to this, it's a lot of work.
"I can not find much help on GH programming on the internet."
True, there is very little out there if you want to go beyond regular component development. The Grasshopper SDK is commented, but that is no substitute for an explanation.
Ok, thank you for the answer.
I will turn to external windows forms interfaces.
Btw cluster with interface will be really cool thing
I progress in my user interface.
But i have some problem for access at the value of a IGH_Goo.
This when i don't know if i have a GH_Point, a GH_Number, a GH_...
Please see this code:
Public Class I_GHView
Public Overrides Sub loadData(ByRef V As Object)
How access to the value when i have just a IGH_Goo type ?
There's three ways to extract a type-safe value from IGH_Goo, and all three can be used together.
 is easiest, but it doesn't really allow you to figure out what type of data you're dealing with, only whether that data can be converted into some other type.  is a last ditch effort, only to be used when everything else fails, basically, it's the only way external data types can play ball with other Grasshopper data, as the conversion to and from these 3rd party types cannot be handled by GH_Convert.  is a lot of typing, but if you're only dealing with a limited subset of possible types, then I suggest you start there. Basically, you test to see whether your IGH_Goo is of type GH_Point, or GH_Number, or GH_String etc. etc. One you know the real type, you can cast it and access the local value.
Thank you David.
I think change my process structure... :(
Yes It's possible with this: (.NET 4)
Dim D As IGH_Goo
Verry intersting... i'm french and works to interfacing grasshopper.
I worked on interface issues for grasshopper.
It would be interesting to get in touch, and if possible share both our knowledge.
David thanks for your reply.