wow, that is pretty much more compact than I did it... Thanks for that lesson!
it gives me more understanding on lists an arrays, but it does not solve my initial problem, the one I probably did not explain very clearly. I can do that much better now though. The code using the command ListA.Add(i) sorts the results to size, so an input of (0,5,3,2) would give a list (0,2,3,5). However, I want to retrieve a list with the original order, so (0,5,3,2). Is there another command to put the elements in the array without losing the order? Jaap On Apr 1, 2:01 pm, David Rutten <[email protected]> wrote: > Hi Jaap, > > Lists are different from arrays. Either use one or use the other (I > recommend using lists). Try the following: > > Dim listA As New List(Of Integer) > > For i As Integer = 0 To all.Count-2 > For n As Integer = 0 To endchord.Count-1 > If (endchord(n).DistanceTo(all(i)) < 1e-32) Then > ListA.Add(i) > End If > Next > Next > > A = listA > > -- > David Rutten > [email protected] > Robert McNeel & Associates
