algorithmic modeling for Rhino
Hello guys,
I wonder if there is a way to convert a list of GH items into a list inside the Python component?
Here a quick example, I want to get the same results from a mass addition without changing my 'item access' into 'list access' (I need the items for other things), is there a way to do it?
Thanks!
Tags:
Hey,
I do not do a lot wit python component, but in general, the thing u are asking is against the concept.
Lets take ur list. Contains 3 elements.
And a component with a single input.
So, the code in the component ...
- with 'Item-Access' runs 3 times.
- with 'List-Access' runs only once.
- with 'Tree-Access' runs always once (but this is an other thing)
U have to choose one for ur code to run.
So if u need both, the list and the item, choose 'List-Access', and do a for OR foreach loop in ur script to take care of each item.
If u are going to have multiple inputs with different Access (ex. item, list), things are going complicated fast because of the matching (item-from-tree + list-from-tree) done internally by grasshopper,
Hope this helps somehow
Greets
Thanks for your response!,
I wanted to avoid using loops and just let the different 'items' inputs take care of themselves.
But I guess I'm just going through the learning curve of scripting and will have to jump into the waters of data coordination...
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by