本帖最后由 作者 于 2004-12-25 19:41:29 编辑
试试:- (defun c:test ()
- (setq os (getvar "osmode"))
- (setq point1 (getpoint "\n请确定第一个对角点 : "))
- (setq point2 (getpoint "\n请确定第二个对角点 : "))
- (setq tim (getreal "\n请输入图框数量 : "))
- ;;(setq tim (atoi time))
- (setvar "osmode" 0)
- (command "undo" "BE")
- (repeat tim
- (setq clu (ssget "w" point1 point2))
- (if (/= clu nil)
- (command "._erase" clu "")
- (princ "完成擦处!")
- )
- (setq point1 (list (+ (car point1) 420) (cadr point1)))
- (setq point2 (list (+ (car point2) 420) (cadr point2)))
- )
- (command "undo" "E")
- (setvar "osmode" os)
- )
|