马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×

- ;;;----------------StretchRight.lsp-----------------------------------------
- ;;; Purpose: Restores expected behavior of STRETCH command in ACAD 2006
- ;;; Author : Herman Mayfarth
- ;;; Date : 4/23/2005
- ;;; Version: 1.1
- ;;; Permission granted to freely use and redistribute without fee.
- ;;; Supplied "as is," and without warranty, express or implied.
- ;;; Acknowledgements: Many thanks to Joe Burke & John Uhden for discovering
- ;;; STRETCH command behaves as if PICKAUTO=0 when called from a LISP routine,
- ;;; unless the value of QAFLAGS is >0, and to Trey Mansour for testing this.
- ;;;-------------------------------------------------------------------------
- (vl-cmdf "undefine" "_stretch")
- (defun C:Stretch (/ *error* oldpik oldqaf olcmd)
- (defun *error* (msg /)
- (setvar "pickstyle" oldpik)
- (setvar "qaflags" oldqaf)
- )
- (setq oldpik (getvar "pickstyle")
- oldqaf (getvar "qaflags")
- oldcmd (getvar "cmdecho") ;_ add
- )
- (setvar "cmdecho" 1)
- (setvar "qaflags" 1)
- (cond ((member oldpik '(1 3)) ;_group selection enabled
- (setvar "pickstyle" (1- oldpik)) ;_disable object grouping
- (vl-cmdf "_.stretch") ;_invoke native stretch command
- (while (= (logand (getvar "CMDACTIVE") 1) 1)
- (command pause)
- ) ;_pause until completion
- )
- (1 ;_group selection disabled
- (vl-cmdf "_.stretch") ;_invoke native stretch command
- (while (= (logand (getvar "CMDACTIVE") 1) 1)
- (command pause)
- ) ;_pause until completion
- )
- ) ;_cond
- (setvar "cmdecho" oldcmd)
- (*error* nil) ;_restore sysvars
- (princ)
- ) ;_C:Stretch
- (princ "\n StretchRight Loaded.")
- (princ)
|