Thursday, July 2, 2009

.dwg .dwt .dws .bak .sv$ can all be DWG files

Typically these are AutoCAD based files but there are other applications that support these file types as well. Any of the following files can be renamed using the .dwg extension or the other way around.

.bak - AutoCAD Backup files

A backup of the .dwg file is created with the extension .bak when a drawing is saved within AutoCAD and ISAVEBAK is set to 1. The backup file is located in the same folder as the drawing file. You can revert to your backup version by renaming the .bak file in Windows Explorer to a file with a .dwg extension.

.sv$ - AutoCAD Automatic save file

If you turn the automatic save option on, your drawing is saved at specified time intervals. By default, files saved automatically are temporarily assigned the name filename_a_b_nnnn.sv$.

Filename is the current drawing name.
a is the number of open instances of the same drawing file in the same work session.
b is the number of open instances of the same drawing in different work sessions.
nnnn is a random number.
These temporary files are automatically deleted when a drawing closes normally. In the event of a program failure or a power failure, these files are not deleted.

To recover a previous version of your drawing from the automatically saved file, rename the file using a .dwg extension in place of the .sv$ extension before you close the program.

You can specify the location of all Autosave files by using the SAVEFILEPATH system variable. SAVEFILE (read-only) stores the name of the Autosave file.

Note that Automatic save is disabled when the Block Editor is open.

You might find that .sv$ files are not created if you frequently save the drawing manually or have the automatic save option off (SAVETIME=0).

.dwt - AutoCAD Drawing Template files

New drawings can be created based on template drawings. A template drawing can be empty but with many settings specified to use as a starter like units, layers, annotation styles and linetypes. A template drawing can also include drawing geometry like a title block, borders and logos.

.dws – AutoCAD Standards files

To set standards, you create a file that defines properties for layers, dimension styles, linetypes, and text styles, and you save it as a standards file with the .dws file name extension. You can decide to create and associate more than one project-specific standards file with an individual drawing.

Update with more details from my friend Chris:

SAV###.tmp and ATMP#### (no extension) could also potentially be drawing files from a failed save.   I wouldn’t trust SAV* files as much because if it is still around it could be a partially created file.

Here is the AutoCAD save procedure I discovered that AutoCAD uses…

1)    Saves a small TEST.DWL text file - a Lock file with the current users information and when the drawing was opened:

User
HOST 
Friday, May 05, 2009  9:57:39 AM

2)    Saves current open file to SAV341.TMP  (random number each time, but begins with SAV and ends with .TMP always)

3)    (Failing here) Rename existing TEST.DWG to ATMP6334  (no file extension, always begins with ATMP)

4)    Delete TEST.BAK if it exists

5)    Rename ATMP6334 to TEST.BAK

6)    Rename SAV341.TMP to TEST.DWG

7)    ReLoad TEST.DWG into memory.

So, if you only have SAV*.TMP files left over, but no ATMP* files it means it only gets to step #2.

AutoCAD IS finishing step 2 (saving the dwg to a TMP file) but for some reason is failing when trying to rename the original DWG file to ATMP, then .BAK.

This can also happen if the .BAK file is Read Only or cannot be written to.


Some of the latest blog posts

Subscribe to RSS headline updates from:
Powered by FeedBurner