I was able to connect the ValueList to the first input of the C# component and get the ListItem, but I can’t figure out how to get the key/value combination of the ValueList from here.
Please let me know if there is any method or reference.
var input = Component.Params.Input[0];
Grasshopper.Kernel.Special.GH_ValueList vallist;
vallist = input.Sources[0].Attributes.DocObject as Grasshopper.Kernel.Special.GH_ValueList;
A = vallist.ListItems.Value;
thank you for your quick response!
And I am very pleased with the detailed explanation
I was able to get the name as well by using “o.Name”!
Thank you very much…!!