CAD改变颜色插件 255个切换颜色
CAD改变颜色插件255个切换颜色按数字是很不错的,我的图层就是数字,和我图层有冲突,怎么在上面加字母去呢? 我晕,这谁写的,纯体力活 ,一个颜色属性对话框就搞定了, 还写了255个颜色切换的, 何必呢。
;1-255颜色命令版
;by edata@mjtd.com 2015-8-2
(defun c:tt (/ i)
(setq i 1)
(while (< (setq i (1+ i)) 256)
(eval
(read
(strcat
"(defun c:"
(itoa i)
"(/ ent)
(setq ent (ssget))
(setvar 'cmdecho 0)
(command \"change\" ent \"\" \"p\" \"c\" "
(itoa i)
" \"\")
(setvar 'cmdecho 1)
(princ)
)"
)
)
)
)
) edata 发表于 2015-8-2 10:52 static/image/common/back.gif
何必呢。
哈哈,高手好思路! 本帖最后由 ucuc2003 于 2015-8-11 11:51 编辑
自定义自己常用的几个颜色,这么多颜色都用不了吧
(defun c:TT4 (/ gbys_z b)
(setq gbys_z "15")
(setq b "咖色")
(zmh_gbys)
)
(defun zmh_gbys ()
(setvar "cmdecho" 0)
(princ (strcat "请选择要改变为<" b ">的对象"))
(while (setq sg (ssget":s"))
(princ (strcat "\n共改变了<" (itoa (sslength sg)) ">个对象。"))
(command "change" sg "" "p" "c" gbys_z "")
);while
(princ)
) ;defun
;;命令S1~S256
(defun c:tt5 (/ i)
(setq i 1)
(while (< (setq i (1+ i)) 256)
(eval
(read
(strcat
"(defun c:S"
(itoa i)
"(/ ent)
(princ \"改变对象颜色(命令:S1~S255:1~255为颜色代号)\")
(while
(setq ent (ssget \":s\"))
(setvar 'cmdecho 0)
(command \"change\" ent \"\" \"p\" \"c\" "
(itoa i)
" \"\")
(princ (strcat \"\n共改变了<\" (itoa (sslength ent)) \">个对象。\"))
);while
(setvar 'cmdecho 1)
(princ)
)"
)
)
)
)
)
本帖最后由 ucuc2003 于 2015-8-11 12:08 编辑
改对象颜色,改对象图层颜色(命令GSS) 記幾個常用的就行了吧 ucuc2003 发表于 2015-8-11 11:22 static/image/common/back.gif
;;命令S1~S256
(defun c:tt5 (/ i)
(setq i 1)
1号色怎么用不了呢? ucuc2003 发表于 2015-8-11 11:41 static/image/common/back.gif
改对象颜色,改对象图层颜色(命令GSS)
这几种颜色够用你
页:
[1]
2