Autodesk introduced the ability to view the thumbnails saved with drawings files in Windows Explorer back under AutoCAD 2004. It made it easier to find and locate blocks in a directory by being able to switch to thumbnail view. So what does this have to do with Backups and Autosave files you might ask? Well a Backup and Autosave file are drawing files just with a different extension that is all. So why not allow me to view the thumbnails without needing to rename the file extension first. Well I am not sure why they didn't enable the feature, but it isn't there.
So while hunting through my Autosave and Backup files to find a certain drawing it hit me. Why not just extract the thumbnail from the file... well drawing files are done this way why not the BAK and SV$ files then. So I set on a quest and it really didn't take that long to figure out how it was working for the DWG and DWT files. I messed around ion the Windows Registry and found the correct key and value that needed to be added for BAK and SV$ files.
Note: Please take extreme caution when venturing into the Windows Registry as one wrong step could render you machine useless. There is no magic undo button if you do the wrong thing.
Below is the code that can be loaded into AutoCAD to enable previews for BAK and SV$ files. Once the code is copied and pasted into the command line simply type the command ENABLEPREVIEW. That's it, then find a backup file and switch to thumbnail view. The code only needs to be run on the machine once and you might need Admin rights in order to run the code since the Registry may be locked down in your work environment.
;; Written by: Lee Ambrosius
;; Created on: 4/7/2004
;; Enable the thumbnail preview of BAK and SV$ files in Windows Explorer
(defun c:EnablePreview ()
;; Add registry keys and values for Backup files (BAK)
(vl-registry-write "HKEY_CLASSES_ROOT\\.bak\\shellex\\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}"
"" "{AC1DB655-4F9A-4c39-8AD2-A65324A4C446}")
(vl-registry-write "HKEY_CLASSES_ROOT\\.SV$\\shellex\\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}")
"" "{AC1DB655-4F9A-4c39-8AD2-A65324A4C446}")
)
This tip will work on machines that have either AutoCAD 2004 (or based product) or AutoCAD 2005 (or based product) installed on them.
Sincerely,
Lee Ambrosius
Lee,
Great little lisp....very handy to get an idea what bak's we have. As usual great job.
Art
Posted by: Art Navar | Thursday, April 08, 2004 at 10:00 AM
This was bingo lisp!
Wright in the middle. Thanks!
saraycad
Posted by: Ismet Karga | Wednesday, April 28, 2004 at 01:06 AM