Finding Duplicates in a List

I’m hoping someone can help point me in the right direction. I’ve been banging my head for a while trying to accomplish what I thought would be a simple task - flagging duplicate Door Numbers in a Revit model. Thus, I’m looking for a simple strategy to isolate a list of duplicates from a longer list containing duplicates. (Basically the inverse of “List.UniqueItems”). The custom node “Duplicate Item Indices” seemed to hold promise - but I can’t get it to return anything (see attached). It seems like I should be able to use “List.UniqueItems” to create a culled list and somehow compare that to the original list so as to return only the duplicated items, but so far the logic has escaped me.

Duplicates

 

 

 

 

 

 

 

Apologies ahead of time if this is a common issue and has already been addressed.

wwm

Hmm, mine is working. Dynamo 0.8.1 with run automatically.

2015-08-12_09h40_54

Hi Bill, you could try something along the lines of this:

2015-08-12_23-41-47

John, I tried it again 0.8.1 (Automatic & Manual) returned Nulls both ways - can someone explain the disconnect? I believe I downloaded the Node this week

Dimitar,

Thanks for the input - I certainly have a ways to go in wrapping my head around this type of logic …

You could also try List.AllIndicesOf

File: Duplicates.dyn

20150813-3

1 Like