lst1 ‘(("N" "123.123,234.234,345.345") ("W" "456.456,567.567,678.678") ("E" "789.789,890.890,900.900"))
lst2 ’ ((“1” "X1" "789.789,890.890,900.900" "123.123,234.234,345.345" "1" "5") (”2“ "Y1" "789.789,890.890,900.900" "456.456,567.567,678.678" "1" "3"))
========》
lst_x ‘((“1” "X1" "N" "E" "1" "5") (“2” "Y1" "W" "E" "1" "3"))
Code - Auto/Visual Lisp: [Select]Hi,Dlanor
;lst1(("N" "123") ("W" "234") ("E" "345")) ;lst2 (("X1" "123" "345" “1” “5”) ("Y1" "234" "345" “1” “3”)) ;========》 ;lst_x(("X1" "N" "E" “1” “5”) ("Y1" "W" "E" “1” “3”)) (foreach x lst2 ) ) ;(setq lst_x (test '(("N" "123") ("W" "234") ("E" "345")) '(("X1" "123" "345" “1” “5”) ("Y1" "234" "345" “1” “3”))))
What if lst2 has one more element!
lst1 ‘(("N" "123.123,234.234,345.345") ("W" "456.456,567.567,678.678") ("E" "789.789,890.890,900.900"))
lst2 ’ ((“1” "X1" "789.789,890.890,900.900" "123.123,234.234,345.345" "1" "5") (”2“ "Y1" "789.789,890.890,900.900" "456.456,567.567,678.678" "1" "3"))
========》
lst_x ‘((“1” "X1" "N" "E" "1" "5") (“2” "Y1" "W" "E" "1" "3"))
It works for me, although it returns ((“1” "X1" "E" "N" "1" "5") (”2“ "Y1" "E" "W" "1" "3")), because that was the order in lst2. Its just a substitution function.Hi,Dlanor!
Then it would be better to store the number in the list as a coordinate. It is far easier to sort using numbers/coordinates than a text representation which has to be converted back to a number.Hi!Dlanor