Assign specific number for each group list

Hi Everyone,
I am creating list to assign item number for different part of fabrication. My script has 2parts (A & B).
In the part (A) after grouping items I want to assign groups which have one item assign them sequentially (1,2,3,4,…) and for groups which have more than one item assign them specific number which should not be same as sequential ones. for example if sequential ends with 1,2,3 other group which have more than one item should have number 4 for whole group.
For part (B), each group should have same number but it has to connected with part (A). for example if the last number of part (A) is 4 then the group in part (B) should start whit 6. firs group all item 5, second group all item 6 and so on.

Second Image

Hi @sbolandin,
Welcome to the Dynamo community.
If you can try to merge the two scripts (Part A & B) in one single graph, that would be the best solution.
Something like passthrough node from clockwork might help you do that, so that part B only starts after part A finishes.

But if you cannot make that work, I would write the last number to a text file in Part A and then read that same text file to get the last number and continue my sequencing in Part B.

Here is how that workflow would look like:
Part A

Part B

Thanks a lot. It works.

1 Like