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)
|