Collecting data tree

unhandled

(Dario955i) #1

Hi,
I have a list of “containers” or “box” in one data tree and a list with the location of “items” referred to the boxes.

I’m not able to create a new data tree with one branch that include all the items for each box…

probably (sure) I was not clear on my request :smiley:

Thanks in advance!

Collecting Data.gh (11.1 KB)


#2

Do you mean that “Data 2” should have a branch for each “object”, whose items are the number of the “containers” where that object is?


(Dario955i) #3

I mean that “container 1”, for instance, can collect one or more items (the proper location you can see on Data2).

In data 2 you see the name of the item (first column, or simply the order of the data tree) and the name of the location (second column or real data of the list).

The goal is to have a branch with this information:

{0;0}
“item 1, item 20, item 45”

where item 1, 20 and 45 are tha ones related with “container 0”


(Tim Stark) #4

Item location -> create set -> member index (set to operate on = location , member to search for = set)-> list item (list = item, index = member index)

Btw: -1 = outside