 - (defun c:TT (/ a col lty txt)
- (setq a (entget (tblobjname "layer" (getvar "clayer")))
- col (getvar "cecolor")
- lty (getvar "celtype")
- )
- (if (setq txt (entsel "\n选择文字: "))
- (if (snvalid (setq txt (cdr (assoc 1 (entget (car txt))))))
- (setq a (subst (cons 2 txt) (assoc 2 a) a))
- (princ "\n** 文字内容不能作为有效层名 **")
- )
- )
- (if (not (wcmatch col "BY*"))
- (setq a (subst (cons 62 (atoi col)) (assoc 62 a) a))
- (princ (strcat "\n当前颜色 " col " 无意义。"))
- )
- (if (not (wcmatch lty "By*"))
- (setq a (subst (cons 6 lty) (assoc 6 a) a))
- (princ (strcat "\n当前线型 " lty " 无意义。"))
- )
- (entmod a)
- (princ)
- )
|