Remove Duplicate Combinations

I have some combinations, but i need remove when are the same.
For example:

279693/280116 = 280116/279693

I need remove one list… anyone.

But, could have another combination with any id listed… so, i should remove ONLY when the combinations are the same, according i said.


Use SetDifference.

1 Like

but i have just one list… i think i wasn’t so clear…

in this case, i have only one situation, but in the real, i will have a lot…

so, what i need is:

you can see that are the same? like A/B = B/A

i need just one, can be A/B or B/A, but i need the INDEX that will stay, to get the list from code block…

Try using BimorphNodes Curve.RemoveDuplicates node (assuming your curves are duplicates in the same location)

in this case, there is no curves duplicates…

the list was created according image below… so there was a lot combinations


List.Unique might work here. May need to get the IDs from the elements first though.

Assuming the order of your elements doesn’t actually matter you just need to sort them by something (name or ID) and get the unique pairs.


Thank you very much!

Could be, but, in my case, the order is important…
Thanks Nick.

The order of your sublists or the order of the paired items?
This only sorts the items and does not reorder the sublists so your list structure stays the same.

Yes, you are right, always kkk…

Your solution worked clean!