Silly and quick list management question


(Alex) #1

Hi All,

Quick question, my mind is throwing a ‘null’

I have three lists:

  • One is a list of points for the closest points to search from
  • One is a cloud of points to search to
  • One is a list of numbers
    The last two lists match in length.

What I want to do is sort the numbers list with the list mask from the closest points sort (see below). I’ve tried several things - but can’t get any to work. I feel replace paths is the way forward but I just cant figure it out! Also - just for further confusion. Because I am finding the nearest 6 points, the data needs to repeat itself!

i.e. I have two lists:
List 1:
[Apples, Bananas, Cherries, Dates]

List 2:
[Ham, Spam, Eggs, Steak]

I arbitrary sort list one as follows:

[[Apples, Cherries, Dates], [Bananas, Cherries, Dates], [Dates, Bananas, Apples]]

So the original paths are sorted as follows:

[[0, 2, 3], [1, 2, 3], [3, 1, 0]]

I want to sort the second list to this pattern i.e:

[[Ham, Eggs, Steak], [Spam, Eggs, Steak], [Steak, Spam, Ham]]

(Tim Stark) #2

upload file please

(Alex) #3

Here we are. I’ve simplified it so there is just the index list and the list to sort. (145.6 KB)

(Alex) #4


As per usual. I need sleep. A simple list item at index worked great…