CAD快速切换图层LISP代码
给楼主发一个图层更改的lisp程序,按对应数字键就可以切换到相应的图层。很方便。 0————0 1————OBJ 2————6t 3————SCETR 。。。
8————BORDER
如果这些不是你想要的图层,将lisp用笔记本打开,把里边的OBJ,6t等图层名改为你想要的就可以了。以后要切换图层时,按相应的数字键即可。
(defun YH_chlayer (YH_layer / YH_S) (if (null (tblsearch \ (entmake (list '(0 . \
'(100 . \ '(100 . \ (cons 2 YH_layer) ;图层名称 '(70 . 0) ;图层状态 '(62 . 7) ;图层颜色 '(6 . \;图层线型 ) ) )
(setq YH_S (cadr (ssgetfirst))) (if YH_S
(command \ (setvar \ ) (princ) )
(defun c:0 () (YH_chlayer \)
(defun c:1 ()
(YH_chlayer \)
(defun c:2 () (YH_chlayer \)
(defun c:3 ()
(YH_chlayer \)
(defun c:4 () (YH_chlayer \)
(defun c:5 () (YH_chlayer \)
(defun c:6 ()
(YH_chlayer \)
(defun c:7 () (YH_chlayer \)
(defun c:8 ()
(YH_chlayer \)