CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE

CAD tip CAD tip # 8408:

Question

CAD 
 %  platform  category 
A
Any modification of the drawing database, including changing system variables, results in the save prompt when you close the drawing. Such changes can be even triggered by your automatically loaded LISP routines - in this case exiting any drawing would invoke the dialog "Do you want to save?".

This AutoCAD behaviour is controlled by the DBMOD variable. This variable is reset by SAVE and set by any change in the drawing. Please note that even a zoom or pan changes system variables stored in your DWG - and so sets the DBMOD. If DBMOD>0 on close, the save prompt is displayed.

There is a method to reset the DBMOD value without saving so you can avoid the Save prompt.

You can save (push) the DBMOD status - especially the zero status - with the (acad-push-dbmod) function. Then you can perform any operation (zoom, edit, create...). After it the function (acad-pop-dbmod) resets the DBMOD value to the original (pushed) value - e.g. 0. Close will NOT invoke the save prompt in this case.

E.g. a script:

(acad-push-dbmod)
_Zoom _E
(acad-pop-dbmod)
_Close
will complete without prompts.

You can also use this method if you are changing some system variables in your ACADDOC.LSP and you don't want to make all your drawings automatically "dirty" - subject to the save prompts.

ACAD
100% *CAD
10.1.2012    13499×  
applies to: AutoCAD ·

See also:
Tip 14657:How do I put the project name and last version date on the PCB?
Tip 14361:Extended ATTOUT/ATTIN for block attribute management in Excel (also for LT).
Tip 14138:How to hide individual block attributes - 3 methods.
Tip 13977:How to publish a PDF to the same folder as a DWG drawing in AutoCAD?
Tip 13740:Dynamic label with filesize of the current DWG file.


Back    All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD: 
OS: 
Categ: 
Text:
 FAQ
  



Featuring:
Increase your productivity with our set of BIM add-on functions for Autodesk Revit
Be.Smart T4R More info


Please use these tips at your own risk.
ARKANCE is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist