- 积分
- 20626
- 明经币
- 个
- 注册时间
- 2011-5-31
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2013-3-24 08:20:17
|
显示全部楼层
本帖最后由 1993063 于 2013-3-23 14:22 编辑
(defun c:命令 ( / *Error* usercmd userosm)
(defun *Error* (msg) ; 异常退出处理
(if (and msg (not (wcmatch (strcase msg) "*BREAK*,*CANCEL*,*QUIT*,*EXIT*,")))(princ))
(and usercmd (setvar "CMDECHO" usercmd) userosm (setvar "OSMODE" userosm))
(vla-EndUndoMark (vla-get-ActiveDocument (vlax-get-acad-object)))
)
(setq *DOC (vla-get-ActiveDocument (vlax-get-acad-object)))(vla-StartUndoMark *DOC)
(setq usercmd (getvar "CMDECHO") userosm (getvar "OSMODE"))
(setvar "CMDECHO" 0)(setvar "OSMODE" 0)
代码...................................
(*error* nil)
(princ)
) |
|