- 积分
- 329
- 明经币
- 个
- 注册时间
- 2009-5-4
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
将所有图层随层
(defun C:ccc (/ )
(vl-load-com)
(setq ModelSpace (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object))))
(vlax-for obj ModelSpace
(if (/= (vla-get-color obj) 256)
(vla-put-color obj 256)
)
)
)
修改图层颜色
(defun c:tc()
(vl-load-com)
(setq acmCol (vla-getinterfaceobject
(vlax-get-acad-object) (strcat "AutoCAD.AcCmColor." (substr (getvar "ACADVER") 1 2))))
(vlax-for x (vla-get-layers (vla-get-activedocument (vlax-get-acad-object)))
(cond
((= (vla-get-name x) "注记") (vla-setrgb acmCol 255 255 255) (vla-put-TrueColor x acmCol))
)
)
)
我的目的是先让“注记”层颜色随层,再让“注记”层变为黑色,用一个命令,谢谢
|
|