Using the sub, you could do something like this to display a nice sorted list.
sub:
Code:
;; Function to obtain list of scale entity names
(defun GetScaleListEntities (/ lst item)
(setq lst nil)
(foreach item (dictsearch (namedobjdict) "ACAD_SCALELIST")
(if (= 350 (car item))
(setq lst (cons (cdr item) lst))
) ;_ end of if
) ;_ end of foreach
lst
) ;_ end of defun
Sub to sort and return names:
Code:
(defun _SortedScaleList (lst)
;; Alan J. Thompson, 11.24.10
(if lst
(vl-sort
(mapcar (function (lambda (x) (cdr (assoc 300 (entget x))))) lst)
(function (lambda (a b / f)
(defun f (s / m l)
(if (setq m (cdr (cond ((member 61 (setq l (vl-remove 32 (vl-string->list s)))))
((member 58 l))
)
)
)
(atof (vl-list->string m))
(atof s)
)
)
(< (f a) (f b))
)
)
)
)
)
eg.
Code:
(_SortedScaleList (GetScaleListEntities))
Just playing around.