generative modeling for Rhino
Tags:

In a similar vein, Sources is also already a collection of IGH_Param, so no casting required there either:
Dim ighList As List (Of IGH_Param) = param_0.Sources
Dim inParam_0 As IGH_Param = ighList(0)
--
David Rutten
david@mcneel.com
Poprad, Slovakia
thanks David - totally overlooked the unnecessary code.
Permalink Reply by erik l on June 18, 2012 at 10:57am First off, thanks for those who contribute, there is much to learn in these posts.
I have worked in GH but am branching into VB scripting now to expand my definitions. The function described here is exactly what I want to accomplish but I am not certain how this would done in the VB script component. Is this something done via a custom component? Basically, if someone could provide me some guidance as to which direction to start, I will be happy to try from there.
Thanks
Erik
Permalink Reply by erik l on June 20, 2012 at 11:26am Alright, I have been trying this now for a few days. I was not successful in creating this either as a custom script component or building a custom component in VB. Can anyone possibly provide a example VB example? I have visual studio and can compile my own component but I am at a loss. I wish I understood more about creating these but having an example to build from would move me ahead.
Thanks again.

What exactly are you trying to accomplish? Do you want to use the nickname of the VB script component inside the RunScript method? Do you want to recompute the script component when the name changes? Or...?
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Permalink Reply by erik l on June 20, 2012 at 1:58pm I was hoping to to pull the nickname from an attached element then feed this to an output from the VB script component. The hope is to combine this with other functions later but for now this would be a good start.
An example would be if you had a list of 10 sliders with custom nicknames, named for specific functions. You could then feed the sliders into the VB component which could take the nicknames and the values and compile them to feed to an excel data spreadsheet. This is more the final goal but at a good start would be to at least pull the nicknames of the sliders for example.
I am attaching an image with a small pseudo-example of what it might look like.
thanks

See attached. File contains some notes and the code is commented.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Permalink Reply by erik l on June 20, 2012 at 4:10pm David,
Thank you, this is very helpful. As this progresses I will try to post an example of the tool under a new posting.
Permalink Reply by phillip on March 12, 2013 at 12:05pm Sorry for my knowledge being so weak, but how do i change your
Dim param As IGH_Param = component.Params.Input(0)
Dim names As New List(Of String)
For Each source As IGH_Param In param.Sources
names.Add(source.NickName)
Next
to recieve just a list in the same tree structure as the input?

I don't understand. What list? What tree structure? Which input?
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Permalink Reply by phillip on March 13, 2013 at 4:37am I just want to recieve the Nickname of the source without any Join String or repeating List.

There might be more than one source. If there's more than one then which should it be? If there are no sources then what should happen?
--
David Rutten
david@mcneel.com
Poprad, Slovakia
© 2013 Created by Scott Davidson.
Powered by