所有图元颜色改为8
将图纸中所有图元颜色改为8,新手刚开始学写lsp,用的command ,见笑了:lol!(defun c:ysxg(/ ss oldos)
(setq ss (ssget "x"))
(SETQ oldos (GETVAR "OSMODE"))
(SETVAR "OSMODE" 0)
(command "change" ss "" "p" "c" "8" "");;颜色度8
(SETVAR "OSMODE" oldos)
(prompt "\n已将所有图元颜色设置为颜色8")
)
支持一下,😃,这个改不了图块噢 大佬支持一下,牛叉~ (SETQ oldos (GETVAR "OSMODE"))
(SETVAR "OSMODE" 0)
(SETVAR "OSMODE" oldos)
这些操作没有必要的吧 只是把外表颜色改了,图块内部颜色没变化哟 可以这样
(COMMAND "LAYER" "U" "*" "S" "0" "") ;解锁所有图层
(COMMAND "LAYER" "C" "8" "*" "") ;所有图层8号色
(COMMAND "setbylayer" "all" "" "Y" "Y" "") ;图元特性随层
所有内容就都8号色了
页:
[1]