Removing duplicate items outside groups

I am trying to pick all duplicate electrical equipment items that do not belong to groups. Tried this graph but I do not understan why the list.set difference produces only one item

Hi,

For our better understanding, please turn on the previews of all the nodes :slight_smile:

I think you may want to try swapping the inputs for List.SetDifference.

I’ll try it on monday, but it seems swapping inputs might do the trick. I’ll post as soon as I test it out

I think I may be doing some logical error here. Selecting directly in Revit gives me 8 duplicatesm List.RemoveItemAtIndex gives 213 - I think it may be due to my lack of understaning of how it works:

I think you are doing a logical error as well :confused:

You’re selecting all the electrical elements that belong to a group, then you are removing all the duplicate elements that are an electrical equipement. The result is : all the electrical equipement that are a duplicate and that belong to a group.

I think the best would be to :

  1. Select all the electrical equipement elements that belong to a group
  2. Select all the electrical equipements
  3. Subtract the two —> You get all the electrical equipement elements that do NOT belong to a group
  4. Select from the list you just created in 3 all the duplicates.

Also, the List.Create node has no use here :slight_smile:

Not sure If I stated correctly what I am trying to achieve here. I have the same EE families in groups and free standing - they both give me an error. I am trying to select the ones that do not belong to groups AND give me the error and delete them. If I understand you right, your option would only to check for duplicates among ungrouped objects. It seems that I am not able to find overlapping objects, because List.DuplicateItemIndices doesn’t give me any of the overlapping objects (I should get an ID 6012336 for instance).

Again, you are making a logical error…

I tried exactly that and got 87 results, whereas Revit shows only 8 such places.

2018-10-23_1051

At least, do those 8 elements appear in Dynamo ?

I do not know how to help your more, I do not know any specifics about your projet.

unfortunately these 8 do not appear after the “Element.Location+” etc. nodes. I tried finding duplicates for furniture, doors, etc. and the results are the same - seems it doesnt’t find duplicates for any kind of objects but I don’t know why.