指定图层,将该图层对象的颜色改为随层
指定图层,将该图层对象的颜色改为随层,哪位高手能用lsp做到????? xiaobaixiaobu 发表于 2013-8-26 13:23 static/image/common/back.gif(defun c:cb (/ ss i elist)
(setq i -1)
(repeat (sslength (setq ss (ssget)))
(defun c:cb (/ ss i elist)
(setq i -1)
(repeat (sslength (setq ss (ssget)))
(entmod(setq i(1+ i)
elist(entget(ssname ss i))
elist(subst'(62 . 256)(if(assoc 62 elist)(assoc 62 elist)(assoc 420 elist))elist))))
(princ)) 香田里浪人 发表于 2014-10-6 13:18
;;;颜色随层
(DEFUN C:CBY ()
(setq s (ssget))
(defun c:GPSC ()
(or *qd (setq *qd 256))
(setq *qd (cond((getint (strcat "\n输入颜色号 <"(itoa *qd) ">: ")))(*qd)))
(vlax-for obj (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)))
(if (member (Vlax-Get obj 'Layer ) (list "SwBzPWJgBz" "SwBzYYJgBz" "SwBzPWXJgBz" "SwBzYYXJgBz" "SwBzJJJgBz"))
(Vlax-Put-Property obj 'Color *qd)
)
)
)请问一下大神,这个代码为什么不能实现啊,附cad 都是好资料,受教了! 指定图层,将该图层的对象改为随层,颜色为黑色,字体为黑体,哪位高手能用lsp做到????? (defun c:cb (/ ss i elist)
(setq i -1)
(repeat (sslength (setq ss (ssget)))
(entmod (subst
'(62 . 256)
(assoc 62 (setq elist (entget (ssname ss (setq i (1+ i))))))
elist
)
)
)
(princ)
) 谢谢楼主分享,辛苦了! llsheng_73 发表于 2014-1-9 15:01 static/image/common/back.gif
(defun c:cb (/ ss i elist)
(setq i -1)
(repeat (sslength (setq ss (ssget)))
受教了! 感谢 llsheng_73 分享程序! ;;;颜色随层
(DEFUN C:CBY ()
(setq s (ssget))
(setvar "cmdecho" 0)
(COMMAND "CHANGE" "P" "" "P" "COLOR" "ByLayer" "")
(PRIN1)
) 香田里浪人 发表于 2014-10-6 13:18 static/image/common/back.gif
;;;颜色随层
(DEFUN C:CBY ()
(setq s (ssget))
太给力了 香田里浪人 发表于 2014-10-6 13:18 static/image/common/back.gif
;;;颜色随层
(DEFUN C:CBY ()
(setq s (ssget))
谢谢!受教育!
页:
[1]
2