Jump to content

Zoom All - Does Not Work


GregGleason

Recommended Posts

So after the end of quite a bit of program calls opening a drawing, near the end of the process I do a ...

 

(command "zoom" "a")(princ)

But it does not work. I'm thinking something happened along the way to make it not respond.

 

Any ideas?

 

Greg

Link to comment
Share on other sites

Hello,

 

Please post the full code, and keep in mind...

When you open another DWG, the lisp wont continue in that DWG.

A lisp file is DWG dependent.

Link to comment
Share on other sites

"A lisp file is DWG dependent." Hmmmmmmmm..................................Wouldn't that depend on how the lisp routine or routines is/are being loaded in the first place? Acad.lsp vs. acaddoc.lsp?

Link to comment
Share on other sites

This is the portion from the acaddoc.lsp, with the zoom-all near the bottom:

 

   (princ "\n\n   Start initializatons to dwg ...")   ; Note status
  (command "undo" "9")                               ; Undo extra added stuff
  (command "zoom" "a")(princ)                        ;_zoom all
  (command "insunits" "1")(princ)                    ; drawing-units value set to "inch
  (command "units" "4" "16" "2" "3" "0" "N")         ; change to architectural units
  (princ)                                            ;
  (princ "\n   Move BOM data to TEXT layer ...")     ; Note status
  (setq mypath (getvar "dwgprefix"))                 ; Read and set current directory path
  (setq mylisp "SetWinToLayerTEXT.lsp")              ; Set the lisp routine name
  (setq mypatlsp (strcat mypath mylisp))             ; Set the path/file of the lisp routine name
  (load mypatlsp)                                    ; Load the lisp routine
  (c:SetWinToLayerTEXT)                              ; Run the lisp routine
  (princ "\n   Move Layer 0 data to FIC layer ...")  ; Note status
  (setq mylisp "ChgLay0toFIC.lsp")                   ; Set the lisp routine name
  (setq mypatlsp (strcat mypath mylisp))             ; Set the path/file of the lisp routine name
  (load mypatlsp)                                    ; Load the lisp routine
  (c:ChgLay0toFIC)                                   ; Run the lisp routine
  (princ "\n   Find/move DIMLDR data to TEXT layer") ; Note status
  (setq mylisp "DIMLDRtoTEXT.lsp")                   ; Set the lisp routine name
  (setq mypatlsp (strcat mypath mylisp))             ; Set the path/file of the lisp routine name
  (load mypatlsp)                                    ; Load the lisp routine
  (c:DTT)                                            ; Run the lisp routine
  (princ "\n   Explode all DIMLDR blocks        ")   ; Note status
  (setq mylisp "ExplodeDimldrBlocks.lsp")            ; Set the lisp routine name
  (setq mypatlsp (strcat mypath mylisp))             ; Set the path/file of the lisp routine name
  (load mypatlsp)                                    ; Load the lisp routine
  (c:EDB)                                            ; Run the lisp routine
  (princ "\n   Delete all ATTDEF with large text")   ; Note status
  (setq mylisp "DeleteBigText.lsp")                  ; Set the lisp routine name
  (setq mypatlsp (strcat mypath mylisp))             ; Set the path/file of the lisp routine name
  (load mypatlsp)                                    ; Load the lisp routine
  (c:DBT)                                            ; Run the lisp routine
  (princ "\n   Read Title Block Data and set ....")  ; Note status
  (setq mylisp "UpdateTitleblockV1-9.lsp")           ; Set the lisp routine name
  (setq mypatlsp (strcat mypath mylisp))             ; Set the path/file of the lisp routine name
  ;(load "P:\\CADWorx\\Project.Models\\Lyondell\\Piping.Iso\\UpdateTitleblockV1-9.lsp")
  (load mypatlsp)                                    ; Load and autorun the lisp routine
  (princ "\nAutoLISP Title Block file loaded.")      ; Note status
  (command "zoom" "a")(princ)                        ;_zoom all
  (princ "\n\n   ========================================\n\n")
(princ)

Greg

Link to comment
Share on other sites

Like aftertouch if this (load mypatlsp) or DBT is using OPEN then lisp will stop you need a script this can run across multiple dwgs and call lisps one simple way around dont know dwg name is to write the script file with correct dwg name as part of the 1st stage of using. then simple (command "SCRIPT" "ABCDEFG") this will end current lisp.

Link to comment
Share on other sites

Like aftertouch if this (load mypatlsp) or DBT is using OPEN then lisp will stop you need a script this can run across multiple dwgs and call lisps one simple way around dont know dwg name is to write the script file with correct dwg name as part of the 1st stage of using. then simple (command "SCRIPT" "ABCDEFG") this will end current lisp.

 

This is all a single operation on one drawing that is already open.

 

BTW, it echos out to the expanded history so you can see that it reached the code, it just does not process the code like it would normally. It does work if I place it earlier in the first part of the code, just not at the back end after all of the operations on the drawing.

 

Greg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...