CAD LISP语言求助
本帖最后由 jinlang007 于 2011-10-24 17:35 编辑(defun c:WW();定义WW命令
(setvar "Expert" 1);禁止显示“准备重生成,是否继续?”以及“是否确实要关闭当前图层?”
(setvar "ORTHOMODE" 0);关闭正交模式
(setvar "osmode" 0);关闭捕捉
(command "layer" "s" "0" "");将图层设为0层
(command "layer" "on" "*" "");将全部图层打开
(command "layer" "u" "*" "");将全部图层解锁
(command "layer" "t" "*" "");将全部图层解冻
(command "purge" "a" "*" "n");清理图形
(command "purge" "a" "*" "n");清理图形
(command "Layer" "off"
(strcat "~"
(cdr (assoc 8 (entget (car (entsel)))))
)
"");只显示选中的图层
(command "explode" (ssget));炸开所选图形注:这一步怎样写可以一选择炸开的物体,就自动执行呢???
(command "pedit" "m" (ssget) "" "J" 2.0 "");多线段合并
(command "layer" "on" "*" "");将全部图层打开
) 别沉。。。。。。。 (command "explode" (ssget));炸开所选图形注:这一步怎样写可以一选择炸开的物体,就自动执行呢???
是否可以改成这样
(setq ss (ssget));先选择要炸开的图形,将图元放在ss变量中
(command "explode" ss);炸开ss变量中的图元。 QaFlags
http://www.google.com/search?q=%28command++Qaflags+%22explode
页:
[1]