Quick thinking outside the box ...
(defun ToList ( string delim / value convert main )
;; delim is a one character string like
;; a comma "," or a pipe "|" etc.
(defun value ( x / result )
(vl-catch-all-apply
'(lambda ()
(vl-some
'(lambda (units) (setq result (distof x units)))
(list (getvar "lunits") 4 5 2 1)
)
)
)
(if result
(if (vl-string-position 46 x)
result
(fix result)
)
)
)
(defun convert ( lst / string )
(cond
( (value
(setq string
(vl-list->string lst)
)
)
)
( string )
)
)
(defun main ( string delim / item lst )
(setq delim (ascii delim))
(foreach code (reverse (vl-string->list string))
(cond
( (eq delim code)
(if item
(setq
lst (cons (convert item) lst)
item nil
)
)
)
( (setq item
(cons code item)
)
)
)
)
(if item
(cons (convert item) lst)
lst
)
)
(main string delim)
)
(ToList "abc,123,def,456.7" ",") => ("abc" 123 "def" 456.7)