I’m looking for a good way to combine data streams into a logical output (I’m sorry if that description is too vague, but I hope it’s evident from the screenshot what I’m trying to achieve.) I believe I only need to replace the highlighted code with something like “s.Value” in order to get values from each of the inputs?
Thanks for any help you can provide. I can find my way around rhinoscriptsyntax, but this stuff is over my head
# https://www.grasshopper3d.com/forum/topics/python-get-label-name-of-input-components
info = []
for input in ghenv.Component.Params.Input:
for s in input.Sources:
### edited code
attr = s.Attributes
if (attr is None) or (attr.GetTopLevel is None):
pass
else:
component = attr.GetTopLevel.DocObject
####
info.append(component.NickName)
a = info
please attach samples if you would like people to try your code.
I think I understand what you are trying to do. In general, reproducing value evaluation is very difficult, and should be Grasshopper’s task. It’s better to let Grasshopper compute, and create data with what is given. For example, this way will work:
Thanks for your reply Giulio, and sorry I wasn’t more clear. I’ve clarified my goals with a screenshot and attached my Rhino and Grasshopper files. Does that make more sense? Please pardon the mess, it’s very much a WIP!