[Search tip detail and code files using keywords, tip number, author name, etc ]
Keep an Eye on Autosave
Tip# 4544 By Andrea Andreetti On 28-Sep-2015
Rated By 1 users
Categories : Saving Files
Software type : AutoCAD 2016
Rename File To : No Files to download.
Check the AutoCAD Savetime variable to make sure Autosave works when you need it to.

Never lose a file again!

Savetime is the AutoCAD variable setting that sets the time delay before creating SV$ file (the automatic backup save files).

Sometimes, for some reason, the Savetime variable is reset to 0, and you might not know about it. It often happens when AutoCAD crashes during the Publish command. What happens is the Publish command sets this variable to 0 during the command process and resets the variable to the original value after it's done. So when the Publish command freezes or crashes AutoCAD, this variable is not reset.

To make sure you never experience this problem, I suggest to put this little LISP code in your ACAD.LSP or ACADDOC.LSP.

(if (eq (getvar 'savetime) 0) (setvar 'savetime 7))

This will automatically set the Savetime variable to 7 min, if it was 0. You can change the value for the increment in minutes that works for you.

Notes from Cadalyst tip reviewer R.K. McSwain: System variables can often seem to "change on their own," but of course you know that something is doing it. Until you figure out what it is, you can follow this tip to simply restore your preferred setting to the variable that is being changed (SaveTime in this case). We suggest using ACADDOC.LSP, which loads each time a drawing is loaded.


Average Rating:

User comments
Comment by Jurado,Daniel
Posted on 2015-09-28 12:40:03
Personally, - I don't use Autosave. I've always been a firm believer in save early, save often. - whenever you pick up the phone, turn away from the computer, go for a cup of coffee or make a change you absolutely don't want to lose. Hit [ctrl+s], it becomes second nature. My main reason is that you don't know when it's going to strike. You may be typing when it runs and whatever you're typing isn't what the program is doing. Then you have to figure out what was and wasn't registered. Just my (long winded) opinion. : )
Comment by Witso,Dave
Posted on 2015-10-27 15:32:53
This used to happen to me, and I think it was caused by the Publish command. Publish turns off the auto save while it completes the publish operation, resetting it back to the previous time upon completion. Occasionally it would crash, leaving Savetime set to zero. My solution was a similar LISP routine, but depending which file it is placed in, the routine only runs at AutoCAD startup or at Drawing file opening and, depending how long you work, you can still lose a lot of data. "Save early, Save often" is good advice.