Hi,

I am having issues iterating through a list in Dynamo. I have a user selected start point that I would like to compare to a list of points to find the closest point within that list. Then I would like to take that 2nd point and compare it to the remaining points to find the closest point to the 2nd point and so on until the list of points is empty. Currently, I only know how to do this by copying the same nodes over, but I’m sure there is a more efficient way to do this. Any help is appreciated! Thanks in advance.

Right now my group of nodes to be repeated is:

Geometry.DistanceTo -> List.MinimumItem -> List.IndexOf -> List.RemoveItemAtIndex