Perhaps it's about time to learn how to customize things... especially if you're obsessed with efficiency.
Try this one. Do the selection +- orthogonally. It works with orthogonal dims only.
(defun c:DDT ( / *error* ort osm o p r s l a f d m) ; dim d=10
(defun *error* (errmsg)
(if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end"))
(princ (strcat "\nError: " errmsg)))
(if osm (setvar 'osmode osm))
(if ort (setvar 'orthomode ort))
(princ))
(setq osm (getvar 'osmode)) (setvar 'osmode (boole 7 osm 16384))
(setq ort (getvar 'orthomode)) (setvar 'orthomode 0)
(while (and (setq p (getpoint "\rSelect from Base Dimension: "))
(setq r (getpoint p " ...all dimensions: "))
(setq s (ssget "_c" p r))
(> (sslength s) 1)
(setq l (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))))
(setq a (strcat "DimLinePoint/" (if (> (abs (- (car p) (car r))) (abs (- (cadr p) (cadr r)))) "X" "Y")))
(setq f ((if (> (abs (- (car p) (car r)))) car cadr) (trans p 1 0)))
(setq l (vl-sort l '(lambda (e1 e2) (< (abs (- (getpropertyvalue e1 a) f))
(abs (- (getpropertyvalue e2 a) f))))))
(setq f (getpropertyvalue (car l) a))
(setq d (if (> (getpropertyvalue (cadr l) a) (getpropertyvalue (car l) a)) 10 -10))
(setq m 0)
)
(foreach e (cdr l)
(setpropertyvalue e a (+ f (* d (setq m (1+ m)))))
))
(*error* "end")
)