把所有图层放入到0层
本帖最后由 惜惜2 于 2024-9-5 08:05 编辑(DEFUN C:ASA ()
(command ".explode" ss "")
(if (= (getvar "cmdactive") 1) (ssget "x" ) (sssetfirst nil (ssget "x" )))
(princ)
)
我需要把块炸开以后全选放入0层,颜色以及线型线宽随层,全选以后提示未知命令这个需要怎么改
qazxswk 发表于 2024-9-2 18:22
感谢大佬:handshake (defun C:A11()
(vl-cmdf "qaflags" 1 "explode" (ssget "x") "" "qaflags" 0)
(if (= (getvar "cmdactive") 0)
(progn
(vl-cmdf "change" (ssget "x") "" "p" "la" 0 "")
(vl-cmdf "change" (ssget "x") "" "p" "c" "ByLayer" "")
(vl-cmdf "change" (ssget "x") "" "p" "LT" "ByLayer" "")
)
)
(princ)
)
qazxswk 发表于 2024-9-2 16:31
(defun C:11 ()
(setq ss (ssget))
(vl-cmdf "qaflags" 1 "explode" ss "" "qaflags" 0)
我改成这个可以自动选了 ,颜色和线型随0层怎么改?
(defun C:A11 ()
(if (= (getvar "cmdactive") 1) (ssget "x" ) (sssetfirst nil (ssget "x" )))
(setq ss (ssget))
(vl-cmdf "qaflags" 1 "explode" ss "" "qaflags" 0)
(if (= (getvar "cmdactive") 0)
(vl-cmdf "change" (ssget "x") "" "p" "la" 0 "")
)
(princ)
) qazxswk 发表于 2024-9-2 16:31
(defun C:11 ()
(setq ss (ssget))
(vl-cmdf "qaflags" 1 "explode" ss "" "qaflags" 0)
不对啊颜色和线宽不能随0层 还有我看我的代码是可以自动全选的你这个需要手动框选对象 (defun C:11 ()
(setq ss (ssget))
(vl-cmdf "qaflags" 1 "explode" ss "" "qaflags" 0)
(if (= (getvar "cmdactive") 0)
(vl-cmdf "change" (ssget "x") "" "p" "la" 0 "")
)
(princ)
) 直接合并图层多好。
人为添堵:@
页:
[1]