单独使用
比如:- (vl-load-com)
- (defun c:GS()
- (GL:LayCol "0" 7)
- (GL:LayCol "厨卫设备" 252)
- (GL:LayCol "家具" 252)
- (GL:LayCol "空调洞" 252)
- (GL:LayCol "预留孔洞" 252)
- (GL:LayCol "空调" 252)
- (GL:LayCol "WALL" 140)
- (GL:LayCol "PUB_DIM" 3)
- (GL:LayCol "PUB_TEXT" 255)
- (GL:LayCol "STAIR" 2)
- (PRINC)
- )
- ;改图层颜色子程序。参数:图层、颜色 例:(GL:LayCol "PUB_DIM" 3)
- (defun GL:LayCol (lay col / acaddoc acadobj layobj vlay)
- (setq AcadObj (vlax-get-Acad-object)
- AcadDoc (vla-get-ActiveDocument AcadObj)
- LayObj (vla-get-layers AcadDoc)
- )
- (setq vlay (vla-item LayObj lay)) ; 转为VL图层名
- (vla-put-color vlay col) ; 改图层颜色
- )
|