[Domanda] Node Group items by ID [Risolto]


Hello everyone,

I have a question:

I want to create sublists of different ID's. I use exactly the same excel file for the ReadPoints node as for the ReadTable node. The csv is sorted by ID number and sublists are created, but this does not work with the ReadTable node and then GroupitemsByID node.

Can someone tell me what I'm doing wrong and still can get my excel grouped by ID?

Allegati (3)

Type: image/png
40 scaricato
Size: 5,34 KiB
Type: image/png
37 scaricato
Size: 42,84 KiB
Type: image/png
46 scaricato
Size: 36,11 KiB

Show solution Hide solution

To use the Node GroupItemsByID, you have to prepare two lists. One list for IDs, another one for the items to be grouped. It will rearrange the item list based on its ID accordingly. Currently, it won't work, if both lists have different size.


This is how it works:
Let's assume you have one ID list:
0 A
1 B
2 B

And one list to be grouped:

0 Point0
1 Point1
2 Point2

You will get a 2-d list as a result:

0 ## for ID = A
└─0 Point0
1 ## for ID = B
├─0 Point1
└─1 Point2

Check the attachted screenshot for better understanding.

Product Owner – Visual Scripting, Allplan GmbH

Allegati (1)

Type: image/png
89 scaricato
Size: 143,13 KiB

To use the Node GroupItemsByID, you have to prepare two lists. One list for IDs, another one for the items to be grouped. It will rearrange the item list based on its ID accordingly. Currently, it won't work, if both lists have different size.


This is how it works:
Let's assume you have one ID list:
0 A
1 B
2 B

And one list to be grouped:

0 Point0
1 Point1
2 Point2

You will get a 2-d list as a result:

0 ## for ID = A
└─0 Point0
1 ## for ID = B
├─0 Point1
└─1 Point2

Check the attachted screenshot for better understanding.

Product Owner – Visual Scripting, Allplan GmbH

Allegati (1)

Type: image/png
89 scaricato
Size: 143,13 KiB

Thank you, it works!


https://campus.allplan.com/ utilizza cookies  -  Maggiori informazioni

Accetta