Any ideas?I think you have changed the format of the list. In your 1st post there are 4 parenthesis in front of the first number. In your last post there are only 3. Ribarm's suggestions works with the original list format.
(setq lst '((((58097.8 68160.0) (58279.0 67834.1)) (#<VLA-OBJECT #<VLA-OBJECT)) (((58793.2 68703.3) (58974.4 68377.4)) (#<VLA-OBJECT #<VLA-OBJECT)) (((58097.8 68426.5) (58279.0 68257.3)) (#<VLA-OBJECT #<VLA-OBJECT)) (((58489.9 68305.8) (58671.1 67979.9)) (#<VLA-OBJECT #<VLA-OBJECT)) (((58097.8 68861.5) (58279.0 68535.6)) (#<VLA-OBJECT #<VLA-OBJECT))))
(setq *fuzz 1.0e-6)
(defun mysort (l)
(vl-sort l '(lambda ( a b ) (if (equal (caaar a) (caaar b) *fuzz) (> (cadaar a) (cadaar b)) (< (caaar a) (caaar b)))))
)
(mysort lst)
_1_$
((((58097.8 68861.5) (58279.0 68535.6)) (#<VLA-OBJECT #<VLA-OBJECT)) (((58097.8 68426.5) (58279.0 68257.3)) (#<VLA-OBJECT #<VLA-OBJECT)) (((58097.8 68160.0) (58279.0 67834.1)) (#<VLA-OBJECT #<VLA-OBJECT)) (((58489.9 68305.8) (58671.1 67979.9)) (#<VLA-OBJECT #<VLA-OBJECT)) (((58793.2 68703.3) (58974.4 68377.4)) (#<VLA-OBJECT #<VLA-OBJECT)))
_$