Almost there, combining nodes - remove duplicates

I got my first dynamo tree almost working.
first i took two steps forward to steps back, but now it is 2 steps forward 1,5 back so I’m making progress.
I thank the communicate for there effort of responding to questions.
Oke now my problem.

There is the node;
remove duplicates from list
and the node;
Duplicate item indices

Now i need the node remove duplicates from list, so it needs to remove both items if they are duplicates
but i want to know which indexes are removed. just like the node Duplicate item indices.

I look at the codes, but i don’t know how to adjust them…

I will publish my tree once it’s done. Maybe someone else can learn from it and maybe someone has got some optimization.

arno, i suggest you go with the “Duplicate item indices” node and adopt it to your needs.






the result list is holding the indices






add seen to the output. this will produce an output with no duplicates and indices for removed duplicates.

if you want to remove both duplicates you will have to change the loop

I do need to remove both duplicates, and need to now which indexes are removed, but to change the loop.

I have to add a second loop which compares the result with the values in seen.
But how do I add up the result of the first loop to the result of the second loop.
I can’t get my head around it…

arno, i started from the “Duplicate Item Indices” node and just adopted the python a litte



i changed the output to 2 lists of tuples holding both index and value

collector holds first occurence of a value

doubles gets all doubles

then we move on with standard nodes

  1. create two lists

  2. combine them

  3. find duplicates

  4. extract the resulting lists

  5. delete doubles from list a

hope that helps.list3

Is this the result you are trying to achieve?

File: UniqueFilter.dyn


1 Like

Peter and Vikram,

Thank you for your efforts, got it solved.

@Vikram, that wasn’t exactly what i ment, I think it’s cool though that you can program by just using a code block

The node if equal return index is a great node…that gave me the idea of reordening my nodes…
By reordening and adding the if equal return index, I got what i wanted.






My first Dynamo project works…
I will post a video and the dynamo project next week…(have to do some work now)


1 Like