[Search tip detail and code files using keywords, tip number, author name, etc ]
 
Shortcuts to Windows Explorer Folders
Tip# 3281 By Steven LaKose On 11-Oct-2009
3
Rated By 2 users
Categories : File Options
Software type : AutoCAD 2010
Rename File To : No Files to download.
These LISP routines open Windows Explorer folders from inside AutoCAD.

Steven LaKose gives us two small LISP routines that will automatically open to very important Windows Explorer folders from inside AutoCAD.

"To use these routines, load them and then type ECD (Explore Current Directory) or EASD (Explore Automatic Save Directory) to start the commands. ECD is very handy when you are nested multiple levels deep and need an Explorer window to view the current folder. The second one, EASD, is much easier than having to explain to a user how to navigate to the AutoSave folder. Too many times his or her value is set to:

C:Documents and Settings<user name>Local SettingsTemp

 

and the local settings folder is hidden, so they can't see the folder.

 

These routines work with pretty much all versions of AutoCAD, Windows XP, and Windows Vista."

 

;========= Explorer to Current Directory

 
(Defun C:ECD ()

   (Setvar "Cmdecho" 0)

   (Command "Shell"

      (Strcat

         "Explorer /n,/e,"              ;Explorer, New Window, use Explorer View

         (Chr 34)                       ;Quote marks

         (Getvar "dwgprefix")           ;Current drive and folder

         (Chr 34)                       ;Quote marks

      )                                 ;Close Strcat

   )                                    ;Close Command

   (Princ)

)                                       ;Close Defun on C:ECD

 
 

;========= Explorer to AutoSave Directory

 
(Defun C:EASD ()

   (Setvar "Cmdecho" 0)

   (Command "Shell"

      (Strcat

         "Explorer /n,/e,"              ;Explorer, New Window, use Explorer View

         (Chr 34)                       ;Quote marks

         (getvar "savefilepath")        ;Current drive and folder

         (Chr 34)                       ;Quote marks

      )                                 ;Close Strcat

   )                                    ;Close Command

   (Princ)

)                                       ;Close Defun on C:EASD 

 

Average Rating:
3


User comments


Log In