 - (defun split-with-comma (str / i rt)
- (while (and
- (> (strlen str) 0)
- (setq i (vl-string-position (ascii ",") str))
- )
- (setq
- rt (cons (substr str 1 i) rt)
- str (substr str (+ 2 i) (- (strlen str) i))
- )
- )
- (reverse (cons str rt))
- )
- (defun c:tt (/ str)
- (setq str (split-with-comma "wl111,AL111"))
- (princ (strcat "\n回路编号" (car str) "\n配电箱编号" (cadr str)))
- (princ)
- )
|