Hi, I’d like to use both the keys and values of value list.
What is the best way to do this?
Hi, I’d like to use both the keys and values of value list.
What is the best way to do this?
copy/paste?
valuelist = ghenv.Component.Params.Input[0].Sources[0]
keys, values = zip(*[(item.Name, item.Expression) for item in valuelist.ListItems])
valuelist-extract.gh (6.1 KB)
Fantastic, thank you!
When I viewed the output of the Value List, is was just the values, so I wasn’t sure how to get it. But programatically ripping open the input component is a great solution. Thanks!