重庆小星之同时改变线段和多段线的颜色和线宽,再此鸣谢小星并做记录
小星同学之同时改变线段和多段线的颜色和线宽,再此鸣谢小星并做记录。(defun c:tt(/ ss ss_gs i a col ss_n ss_n_0 )
(setq ss(ssget '((0 . "LWPOLYLINE,LINE"))))
(setq ss_gs (sslength ss))
(setq i 0)
(setq a '())
(setq col (acad_colordlg 5))
(repeat ss_gs
(setq ss_n (ssname ss i))
(setq ss_n_0 (cdr (assoc 0 (entget ss_n))))
(setq a(cons ss_n_0 a))
(setq i (1+ i))
(command "CHANGE" ss_n "" "p" "c" col "")
)
(if(member "LINE" a)(command "PEDIT" "m" ss "" "y" "w" "60" "")(command "PEDIT" "m" ss "" "w" "60" ""))
(princ)
) (defun c:tt(/ ss ss_gs i a col ss_n ss_n_0 )
(setq ss(ssget '((0 . "LWPOLYLINE,LINE"))))
(setq ss_gs (sslength ss))
(setq i 0)
(setq a '())
(setq col (acad_colordlg 5));颜色弹窗
(command "CHANGE" ss "" "p" "c" col "");改颜色
(repeat ss_gs
(setq ss_n (ssname ss i))
(setq ss_n_0 (cdr (assoc 0 (entget ss_n))));对象名
(setq a(cons ss_n_0 a));合并选择对象名
(setq i (1+ i))
)
(if(member "LINE" a)(command "PEDIT" "m" ss "" "y" "w" "60" "")(command "PEDIT" "m" ss "" "w" "60" ""));改线宽
(princ)
) 感谢 ,学习一下 学习学习
:lol 好东西哦感谢分享
页:
[1]