JM> The LISP is appreciated. But all I really got from it was the
JM> diagnostic 'Extra Right Paren'.
HL> Very strange! After reveiving your reply I exportet the Lisp
HL> from my mail and colud load it into ACAD without any problems.
Resurrecting this old thread...I just tried your lisp again and
still all I got was a nil. But I have been working out my own
version of a solution, and in examining your lisp I find it has some
interesting techniques in it, particularly for extracting the
PSPACE/MSPACE condition. I kept mine much simpler, maybe I'll regret
it later, but I'm going to see if I can just do all my work in
TILEMODE=0.
HL> Anyway, I hope the two samples above show how tilemode, mpsace,
HL> pspace and zoom can be handled from lisp.
Yes, those were good examples. I ended up making three lisps, ZDW
(Zoom Draw Window), ZDB (Zoom Draw Back-"prev"), and ZDA (Zoom Draw
All). This syntax is all accessible from the left side of the
keyboard. "Draw Mode" in my vocabulary means the same as PSPACE. To
switch back and forth from PS to MS I put aliases in ACAD.PGP for
DR (DRaw mode)= PSPACE, and
VW (VieW mode)= MSPACE
This is what I ended up with for my ZD*.LSPs:
; ZDW.LSP, Zoom Draw Window; puts you in Draw mode and Zooms, JOM
; NOTE: if the screen goes blank, make sure that you already have
; a view defined with MVIEW.
(DEFUN C:zdw () ; p. 4-19
(COMMAND "TILEMODE" "0")
(COMMAND "PSPACE") ; Draw mode
(COMMAND "ZOOM" "W" PAUSE PAUSE) ; p.2-10,11
; the problem was that I wanted to be able to save/store
; the initial PSPACE or MSPACE condition and restore
; it now, but I didn't know how to access the intitial
; PS/MS condition (but p. 7-50 explains this). The
; following MSPACE command will always kick you back
; into Model mode. Use ZDB.LSP (Zoom Draw Back) to get
; back to the Previous zoom display or ZDA to
; "Zoom Draw All".
(COMMAND "MSPACE") ; Model mode
) ; enddefun
; ZDB.LSP, Zoom Draw Back/Previous; goto Draw mode and Zoom Prev
; resets you to VieW (PS) Mode
(DEFUN C:zdb ( / imode) ; p. 4-19; imode= initial mode
(SETQ imode (GETVAR "TILEMODE")) ; p. 2-6
(COMMAND "TILEMODE" "0")
(COMMAND "PSPACE") ; Draw mode
(COMMAND "ZOOM" "P") ; p.2-10,11
(SETVAR "TILEMODE" imode) ; restore to inital Tilemode
(COMMAND "MSPACE") ; Model mode
) ; enddefun
; ZDA.LSP, Zoom Draw All; goto Draw mode and Zoom All 24JUN96 JOM
; resets you to VieW (PS) Mode
(DEFUN C:zda () ; p. 4-19
(COMMAND "TILEMODE" "0")
(COMMAND "PSPACE") ; Draw mode
(COMMAND "ZOOM" "_A") ; p.2-10,11
(COMMAND "MSPACE") ; Model mode
) ; enddefun
Initially so far, this seems to work. This is *much* more
productive than switching back and forth to PSPACE before Zooming. I
just hope I don't have problems with staying at TILEMODE=0. My next
project will be to figure how to trim lines that don't intersect,
trim to a specific length, and trim an incremental length. These are
all functions I was accustomed to using ComputerVision. And now I
understand that R13 has incorporated at least some of this...
--- FLAME v1.1
---------------
* Origin: The Manufacturing Technology BBS! // 210-821-6356 (1:387/783)
|