本帖最后由 greatvictory 于 2012-5-22 09:32 编辑
曾经有位高手教过我这样的办法
- (setq v1 (getvar "cmdecho"))
- (setq v2 (getvar "blipmode"))
- (setq v3 (getvar "osmode"))
- (setvar "cmdecho" 0)
- (setvar "blipmode" 0)
- (setvar "osmode" 0)
- (if (vl-catch-all-error-p (vl-catch-all-apply '(lambda ()
- (此处添加主程序)
- )))
- (progn
- (setvar "cmdecho" v1) ;;;还原系统变量
- (setvar "blipmode" v2)
- (setvar "osmode" v3)
- (princ)
- )
- )
|