 - (defun c:tt () (setvar "cmdecho" 0)
- (princ "\n选择文本: ")
- (if (setq ss (ssget '((0 . "text"))))
- (progn
- (setq lst '(("AAAAAA" 1) ("AAAAA" 2) ("AAAA" 3) ("AAA" 4) ("AA" 5)("A" 6) )
- lst1 (mapcar 'car lst)
- i -1
- )
- (while (setq s1 (ssname ss (setq i (1+ i))))
- (setq tx (xyp-DXF 1 s1))
- (if (setq lst2 (member (strcase tx) lst1))
- (setq nn (- (length lst) (length lst2))
- tx (itoa (cadr (nth nn lst)))
- s1 (xyp-SubUpd s1 1 tx)
- )
- )
- )
- )
- )
- (princ)
- )
|