TIP: Click on subject to list as thread! ANSI
echo: a_cad
to: JERRY MYER
from: HANNES LUEBBERS
date: 1996-05-11 10:43:00
subject: ZOOMING; PS/MS

Hi Jerry!
Jerry Myer wrote to Hannes Luebbers:
 JM>    The LISP is appreciated. But all I really got from it was the  
 JM> diagnostic 'Extra Right Paren'.  
Very strange! After reveiving your reply I exportet the Lisp from my mail and 
colud load it into ACAD without any problems.
Heres another quick hack. The first one will switch to paperspace and let you 
zoom the drawing. Because the first one will only zoom windows you need 
another one to zoom out the the extents of the drawing.
(defun C:ZV ( / _flag )
  (if (= 0 (getvar "tilemode"))
    (progn
      (if (/= 1 (getvar "cvport"))
        (progn
          (setq _flag T)
          (command "_pspace")))
      (command "_zoom" "_w")
      (while (> (getvar "cmdactive") 0)
        (command pause))
      (if _flag (command "_mspace")))))
(defun C:ZE ( / _flag )
  (if (= 0 (getvar "tilemode"))
    (progn
      (if (/= 1 (getvar "cvport"))
        (progn
          (setq _flag T)
          (command "_pspace")))
      (command "_zoom" "_e")
      (if _flag (command "_mspace")))))
I do 98% of my work in acad with tilemode=1. Paperspace only is used to 
arrange viewports add a frame and type the name of the drawing. 
I do this because I use a video driver that comes with it's own zoom 
functions (Spea Bigfocus) which  are _much_ quicker than the original acad 
zoom functions. But these functions do not work with tilemode=0.
Anyway, I hope the two samples above show how tilemode, mpsace, pspace and 
zoom can be handled from lisp.
have fun, hannes
---
---------------
* Origin: UMRK (2:240/2123.50)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.