洪少(刀模) 发表于 2014-8-26 08:24:59

lisp无法执行后面的语句

(defun c:L1mm() ;获取"马巴清废针"
    (command "undo" "g")
    (setq os (getvar "osmode"))
(command "_ucs" "")
(setvar "cmdecho" 0)
    (setq p1 (getpoint "请选择基点:"))

;;;插入设定好的永久“块”-------需选择“插入点”及“角度”
 (command "-insert" "C:\\Program Files\\AutoCAD 2004\\stripping\\L1mm.dwg" "s" "1" p1)
;;;;;以下不能执行,有办法吗?----------------应该是以上命令没有完全lisp执行完导致的,单条调试是没问题的
 (command "-refedit" p1 "o" "A" "")   ;;;编辑块名为"L1mm"的块---参照编辑:refedit命令
(command "ERASE" (ssget "X" '((62 . 88))) "") ;;;删除块中颜色为"88"的图形
(command "_refclose""")  ;;;关闭块的编辑---关闭参照编辑

(command "undo" "end")
(setvar "osmode" os)
(princ)
)

洪少(刀模) 发表于 2014-8-26 10:56:27


(command "-insert" "C:\\Program Files\\AutoCAD 2004\\stripping\\L1mm.dwg" "_non" p1 "" "" pause)
改成这样即OK
页: [1]
查看完整版本: lisp无法执行后面的语句