Consecutive numbers in list

Hi there,

I need to divide a list of numbers in a data tree into sublists where a sub list is created everytime the following number in the list is not consecutive. here an example:

Now i am trying to do this for a data tree with many of there lists. however, this same node setum won’t work due to the difference in list length when trying to replace paths:

can anyone help me?


Can you upload your initial tree? Creating it manually is more bothering than solving the problem…

1 Like

thanks in advanced :slightly_smiling_face:
Data-tree.csv (100.5 KB)

In the screenshot it seems you have already parsed the .csv, can you please upload a .gh with the pre-parsed datatree internalized?

Consecutive numbers in (8.3 KB)

1 Like

thanks so mutch! could you tell me what is written in those path mappers?

how do i parse the datatree? (so sorry for my noobness)

Download file. First one reverse point group paths (IDK if it’s a bug but it return the index backwards for some reason). Second one is just a shift paths that works when there is one (and two) path indices. (16.2 KB)

Thanks! <3

thanks :slight_smile: althoug for some reason the “point groups” component has an error here.

If you let me, I’ll help you to correct the issue. :upside_down_face:


How do i fix it so u can help me? :slight_smile:

Imagine that we are in a virtual hospital and I am your doctor and this definition is your illness. You tell me that you are sick, but you don’t give me any symptoms of your illness and I can’t diagnose you from a distance, you just tell me that you are sick. What can we do? Die playing guessing games or let me understand your illness.



so, your solution should work; as you have shown, multiple lists in the data tree do work with your setup. however, the “point groups” component has an error. It might be because of the first few lists (60 or so) dont have any items in them. although i do need them to be there to keep the correct order of indexes. The malfunction of that component, or the “empty branches” of the main data tree, creates a failure where the partition list component does not work properly.
here is the Gh File: (13.6 KB)

i hope this gives you enough information. Thanks you! :slight_smile: (19.4 KB)
There you have it, check if it is working. As your doctor I advise you to stop smoking those empty branches.

hahahah thanks! that pun made my day! XD I will definately take that advice!
but this was not necessarily the problem. the problem is that at the end (after partition list) the lists are not really partitioned.
As you can see, at branch 60 for example: the list jumps from 26 to 334. While it should have made a sub-list for the next list of consecutive numbers.

i’m sorry for being too vague before!

I think i Fixed the problem:

I had to add those empty branches in order for the partitionlist size to work.
Quitting smoking those empty branches would definately help in the future :stuck_out_tongue_winking_eye: