liminnet 发表于 2008-6-12 17:55:00

caoyin 发表于 2008-6-13 11:35:00

(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)
)

liminnet 发表于 2008-6-13 13:26:00

页: 1 [2]
查看完整版本: 这是不进CAD图层对框话可以建图层的最好办法,现在想修改.