Print Page | Close Window

ELIMINATE pan/zoom commands from triggering save?

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DWF formats, Design Review, AutoCAD 360, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=7151
Printed Date: 17.Apr.2026 at 21:22


Topic: ELIMINATE pan/zoom commands from triggering save?
Posted By: tulip3D
Subject: ELIMINATE pan/zoom commands from triggering save?
Date Posted: 10.Jan.2012 at 17:19
Hello,
 
Is there any possible way to eliminate the pan and zoom commands from triggering a save required? As in limit the 'save drawing' prompt to only come up when something is ACTUALLY changed, not just the view?
 
just wondering, and yes, im familiar with the pan/zoom combine in undo...
 
any suggestions? ideas?
 



Replies:
Posted By: Vladimir Michl
Date Posted: 10.Jan.2012 at 20:28
There is one way to do this - see the tip:
http://www.cadforum.cz/cadforum_en/how-to-avoid-save-prompt-after-zooming-or-other-operations-tip8408 - http://www.cadforum.cz/cadforum_en/how-to-avoid-save-prompt-after-zooming-or-other-operations-tip8408


-------------
Vladimir Michl (moderator)
ARKANCE - https://arkance.world" rel="nofollow - https://arkance.world - Autodesk Platinum Partner


Posted By: tulip3D
Date Posted: 10.Jan.2012 at 20:35
Thanks Vlad!!
So if I understood that correctly, I must type 'acad-pop-dbmod' into the command prompt after I've zoomed and panned (or anything) and wish to simply close without saving?
Or is there something more universal that just discounts zoom and pan commands altogether?


Posted By: tulip3D
Date Posted: 10.Jan.2012 at 20:38
Tried it, acad states 'unknown command'...?


Posted By: John Connor
Date Posted: 10.Jan.2012 at 23:34
Did you run the script?

(acad-push-dbmod)
_Zoom _E
(acad-pop-dbmod)
_Close

Found this explanation at JTB World Blog:

http://blog.jtbworld.com/2007/12/make-changes-to-drawing-without.html



-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: tulip3D
Date Posted: 11.Jan.2012 at 15:32

John, wtf is a script....LOL I cant really find anything definitive via google...



Posted By: John Connor
Date Posted: 11.Jan.2012 at 16:12
Tulip: I thought you had used scripts before.

A script is something one uses to apply a set of commands to multiple drawings by specifying a script file and a list of drawings that you would like to apply the script to.


-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: tulip3D
Date Posted: 11.Jan.2012 at 16:16
Thats what I thought too...?
 
Procedure? Like loading a Lisp routine?


Posted By: Vladimir Michl
Date Posted: 11.Jan.2012 at 16:55
Yes, script is a "macro" - a series of commands executed in sequence. You can of course invoke them also individually. And this is what I meant.
 
Before zooming, do the "push" and after zooming do the "pop". The DBMOD will not be bumped and your drawing close will not prompt for save. You can also preset a new menu button (call it e.g. "SafeZoom") and perform the 3 commands: push;zoom;pop
 


-------------
Vladimir Michl (moderator)
ARKANCE - https://arkance.world" rel="nofollow - https://arkance.world - Autodesk Platinum Partner


Posted By: tulip3D
Date Posted: 11.Jan.2012 at 17:17
Yeah i'm still lost...trying to input commands through the command line to no avail...
 
but scripts are pretty much files i must download then execute? what file?
 
Really, I just want to simply ELIMIMATE ALTOGETHER the zoom and pan commands from triggering a 'save as'...if this is not possible tell me now and I can move on. Having to do this each time is not worth the trouble...


Posted By: John Connor
Date Posted: 11.Jan.2012 at 18:31
Scripts are not files that you download.  They are files individual users create to satisfy their own needs.  Here is a simple script I wrote that opens a drawing (1TA996.dwg), does a Zoom > Extents, executes an Audit and saves the drawing before closing it.

-open
c:\DWG\PIDs\1TA996
zoom e
audit y
qsave
close

This script I named as mysample.scr (SCR is the file extension for a script file).  I "call" this script from the AutoCAD command line by typing mysample.scr then pressing the Enter key.  The script runs.

I apologize for not being able to fully answer your question as I thought Vladimir had done so.


-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: tulip3D
Date Posted: 11.Jan.2012 at 18:37
no no its all good JC...good info altogether.
 
But basically a script has to be made? and saved? and then called up?
 
But back to the basics, is there any way to disable acad from considering the pan and zoom commands worthy of a save all in all? that script idea seems good for the 'per dwg' occassion...i want a blanket change to the system...


Posted By: John Connor
Date Posted: 11.Jan.2012 at 18:46
Made...saved...and then run.

I'm still searching for an answer.

How about a one button macro that closes the drawing and immediately answers "No" to the save changes dialog box?  It will NOT suppress the dialog box however.  For that I think you would need to do a bit of programming and I am not talking a script either.


-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: John Connor
Date Posted: 11.Jan.2012 at 18:59
The answer to your problem comes from ASMI.  He says that VBA can resolve the problem and offered up this:

Sub Close_Open()
ThisDrawing.SendCommand "open vbCr"
ThisDrawing.Close (False)
End Sub

Add the file to your Startup Suite and make a button macro ^C^C(vl-vbarun "Close_Open") to run it from within AutoCAD.


-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: tulip3D
Date Posted: 11.Jan.2012 at 19:03
Hmmm...programming...sounds like a challange!! LOL
 
Thanks jc, great material!Thumbs%20Up



Print Page | Close Window