664571221 发表于 2023-9-10 20:11:12

重庆小星之同时改变线段和多段线的颜色和线宽,再此鸣谢小星并做记录

小星同学之同时改变线段和多段线的颜色和线宽,再此鸣谢小星并做记录。

664571221 发表于 2023-9-10 20:12:16

(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)
)

664571221 发表于 2023-9-10 20:14:28

(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)
)

不一样地设计 发表于 2023-9-11 11:26:24

感谢 ,学习一下

wline 发表于 2024-7-6 21:47:05

学习学习
:lol

wline 发表于 2024-7-12 15:48:39

好东西哦感谢分享
页: [1]
查看完整版本: 重庆小星之同时改变线段和多段线的颜色和线宽,再此鸣谢小星并做记录