List with sublist and the previous and next sublist

Hie,
I am trying to create a list with three list, 0,1,2 List //1,2,3 List//2,3,4 List//… I mean the list, the previous and the next list.
Anybody could help me?
Regards.


This but in automatically way to all the sublists

Look at the List@Level paragraph in this part of the Dynamo Primer.
https://primer.dynamobim.org/06_Designing-with-Lists/6-3_lists-of-lists.html

1 Like

Thanks a lot Marcel. Maybe i don´t explain well, my problem is not select the item in differents levels, if not is make list of three components with the item and the previous-next item. I don´t know how to make it for all the items. In the image, i want to make a list with the 0List-1List-2 List, other with 1List-2List-3List,…
Maybe with List.ShiftIndices…i am going to try it.
Regards.

I don´t know if it is the best way but it works.

Think this is what you mean. I drop the First&last because there is no -1 index for the first item and no +1 index for the last item.

@FRAN1972 I think List.Sublists would be a neat solution.


You can drop the first & last list as suggested by @Bjorn_Keulemans1 if required.