I haven’t used this workflow in a while, but a request from one of my readers came in asking if i could update this workflow to the latest version of Dynamo. Here it is with a few changes which I think make it a little bit more efficient.
Item selection method has not changed. I am still using Family Type and All Elements of Family Type nodes to get all of the families that I am interested in. What did change however, is the next node that used to be a custom node from Clockwork package. It’s no longer needed in this case since Dynamo now has a FamilyInstance.Location node built in. Next is an updated List Duplicate Item’s Indices nodes that will do just that…it will compare all items in a list and list index numbers of a duplicate item the first time it spots it and all the next subsequent instances if there are more than one duplicate. Here’s the code:
Next was extracting duplicate items from the original list using the index numbers and deleting them. Since there is no delete element node in Dynamo i have made one. Here’s code for it:
That’s it! Let me know if that works for you all! Example file and custom nodes can be downloaded here: Download
Jesper, has pointed out to me in the comments below that this method doesn’t work with Structural Framing elements since they return either a Curve or a Location Point class object as their Location. So, Structural Beam will return a Curve as its location while Column has its own class called Location Point. As it happens now there is no node in Dynamo that can get you Column Location point, but you can use a custom Python node and this code to achieve this:
Use this code to get a Point and then you can compare that to other points to find duplicates.
One more quick pointer is that List Duplicate Item’s Indices node is really not going to work with Lines, but if you use Curve.PointAtParameter to get a point then you can compare those easily.