Incremental collector

hello, if I have a list of lists, sometimes I have multiple elements in those sublists. If the sublists are identical, I want to be able to select the next incremental number or next index value of each sublist and discard the rest. But at the same time keeping the sublists that have only one valuse. See below for a what i mean. Thanks

If I am understanding you correctly will this work?
Capture

Hi Steven, I am not sure i follow you either. But if I had two sublists of 1 and 3, and a second one of 1 and 3, then I want to be able to extract 1 from the first sublist and 3 from the second sublist and so on. Does that make sense? your graph seemed to end with multiple numbers in the each sublist. I only what one number in each sublist and never a duplicate number from earlier in the list.
does that make sense?

What about this.

The last part can be found from this post. (I sent it to you earlier today in a different post)

No because I have to use the existing numbers from each sublist. I was able to get close. This solution actually works for my current selection but fails if I have more than two numbers in each sublist. See below. I utilized the deconstruct list node, to chop away the numbers I use in each sublist. but I was hoping to find some way to count the occurrences of each sublist (entire sublist) but failed miserably. My thought was to use the count of each sublist to set up some sort of loop or repeat a number of times function.

Try to use the original solution from @Steven, but instead of Duplicate Item Indicies use List.Unique, followed by List.IndexOf, followed by List.First (longest lacing - this may not be required though - check the list structure), followed by List.GetItemAtIndex.

@mix - if that doesn’t work please upload a small dyn data set that indicates what you have in a list, and a second list (manually typed) showing the desired result.

1 Like

Alright guys, I am not sure what either of you are trying to do, but I wrote it out so I could see it. Below is what I got. I dont understand the purpose of putting a dash between 2 numbers, nor do I understand what the index of is supposed to grab. I am trying to eliminated a number after the first time it shows up in the list. the second picture is of the action that I want, but its limited to there only being 3 numbers in each sublist. so at least you should be able to see what I am trying to do. Thanks so much for your help.


Like this?

2 Likes

@Nick_Boyts, yes exactly like that. Let me test it out for all occurrences…

@Nick_Boyts
Hi Nick, this actually doesnt work because it messes up the order of the indicies. I need to be able to track the original location of each item in the original list to be able to do anythng with this data. See below.

If you want good help, post the dyn I requested above. We don’t need rvt files nor Revit interaction content, but we need a clear starting point and end goal to work towards, which you can create directly in Dynamo. Doing so will often help you resolve the problem effectively.

2 Likes

Hello, Here you go, This is what I am trying to get. But I keep failing.
image Incremental collector.dyn (47.5 KB)