how to shorting......

Now if sorting is what you mean then the following might help.
Tony does have great answers.

In AutoCAD 2000:

(defun numsort (numlist)
(mapcar 'itoa
(vl-sort
(mapcar 'atoi numlist)
'<
)
)
)
Any suggestions on how we can sort a list of numbers in String form...

For example '("5" 20" "12" "4")

If we use "acad_strlsort" on a list sorting will be done in the form:
'("12" "20" "4" "5")

we need the sorting to be in the form: '("4" "5" "12" "20")

Thanks

Victor
 
like this may be

_$ (setq srt (list "A3" "A11" "A5" "A1"))
("A3" "A11" "A5" "A1")
_$ (vl-sort srt '<)
("A1" "A11" "A3" "A5")
_$
 

Latest threads

Back
Top