 - (defun c:tt()
- (princ "\n选择源文字")
- (setq ss1 (ssget '((0 . "TEXT"))))
- (princ "\n选择目标文字")
- (setq ss2 (ssget '((0 . "TEXT"))))
- (setq i 0)
- (if (and ss1 ss2)
- (while (< i (sslength ss1))
- (progn
- (setq text1 (cdr (assoc 1 (entget (ssname ss1 i)))))
- (command "_.CHPROP" (ssname ss1 i) "" "c" (1+ i) "")
- (command "select" ss2 "")
- (if (setq ss (ssget "p" (list '(0 . "text") (cons 1 text1))))
- (command "_.CHPROP" ss "" "c" (1+ i) "")
- )
- )
- (setq i (1+ i))
- )
- )
- (prin1)
- )
|