也许是这个。这很简单,但很有效:
- (defun C:S1 () (DRAWVP 1))
- (defun C:S2 () (DRAWVP 2))
- (defun C:S4 () (DRAWVP 4))
- (defun C:S8 () (DRAWVP )
- (defun C:S12 () (DRAWVP 12))
- (defun C:S16 () (DRAWVP 16))
- (defun C:S24 () (DRAWVP 24))
- (defun C:S32 () (DRAWVP 32))
- (defun C:S48 () (DRAWVP 48))
- (defun C:S96 () (DRAWVP 96))
- ---------------------------------------------------------------------------------------
- (defun DRAWVP (Scale / OLDCMD CVP SS)
- (setq OLDCMD (getvar "cmdecho"))
- (setvar "cmdecho" 0)
- (if (/= (getvar "cvport") 1)
- (progn
- (command "_zoom" "_s" (strcat "1/" (itoa Scale) "xp"))
- (setq CVP (getvar "cvport"))
- (setq SS
- (ssget "_X"
- (list
- (cons 0 "viewport")
- (Cons 69 CVP)
- )
- )
- )
- (command "_vports" "_L" "ON" SS "")
- (command "_pspace")
- )
- )
- (setvar "cmdecho" OLDCMD)
- (princ)
- )
- (princ)
|