Monday, February 27, 2006

Save Time Exploring

It is a well established fact that I am lazy. One common task I find my self doing in an AutoCAD environment is browsing to files I need to open. My file structure has them placed near each other but I have to keep drilling down to the appropriate folders and files. Because my drawing files are usually always in the same folder I wrote a simple command macro to open Windows Explorer pre-browsed to the folder where the current drawing is located. Add this to a palette or toolbar to quickly access drawings in the same folder as the current drawing.

Here's the Macro:
(command "start" (strcat "explorer " (getvar "dwgprefix")))

Here's what it means:
(command "start" tells AutoCAD to shell out and start another program.

(strcat "explorer " Tells the operating system to start Windows Explorer

(getvar "dwgprefix"))) tells explorer to browse to the current drawings prefix, which happens to be the folder it is located in.

I hope this little gem makes your life easier, because that's what I'm all about.

1 comment:

RobiNZ said...

Wouldn't it be nice if this function was core Windows and avialable in all applications!