Solve Clash Automation

I am trying to start creating a script for solving the clash from revit.
Initially I already have problems from the start to create individual list for the clashed elements.( see attached). I tried to use method of intersection but they always show the clashed objects in 2 sets. I wish to have a separated list for the clashed groups (pls refer to the image).
i will use the list to update the family parameters and place the family again and check interaction and loop until no clash.
Thanks!

capture2

What about you have Dynamo look through the list with clashing elements. If one ElementId is present in multiple lists then you can group those elements together in one list.

1 Like

May someone kindly teach me how to split the list into sublists and
remove the item with smallest ID no. from each sublist?
Wondering sorting may be required as the ID no not follow the list index (i.e. from small to large no.)
Thank you.capture5