TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: ELOQUINTET on June 20, 2007, 10:07:16 AM

Title: Open to directory not working anymore
Post by: ELOQUINTET on June 20, 2007, 10:07:16 AM
Hey guys I have this little lisp routine that would open explorer to the current folder but it has recently stopped working.

(defun C:DIRR ()(COMMAND ".BROWSER" (GETVAR "DWGPREFIX")))

I get the message:

createprocess:file not found
internet browser not found

I know it is probably due to the fact that I recently upgraded my internet explorer to 7 but how can I fix this?
Title: Re: Open to directory not working anymore
Post by: ronjonp on June 20, 2007, 10:54:41 AM
See if this one works:

Code: [Select]
(defun c:dirr (/)
  (startapp "explorer" (strcat "/e," (getvar 'dwgprefix)))
)
Title: Re: Open to directory not working anymore
Post by: ELOQUINTET on June 22, 2007, 02:24:20 PM
ah yes thank you so much ron. you never realize how much you miss something until it's gone. gracias
Title: Re: Open to directory not working anymore
Post by: terrycadd on June 22, 2007, 02:51:01 PM
Now that's cool!  I use the keyboard shortcut [Windows_Key + E], which just brings up Explorer.  Now I need to add your idea to my shortcut commands.

Muchas Gracias.  Eres Rey!
Title: Re: Open to directory not working anymore
Post by: Guest on June 22, 2007, 03:10:10 PM
I use a slightly different version which will automatically highlight the drawing in the Windows Explorer folder.

Code: [Select]
(defun C:WinExplorer ( / )
   (STARTAPP (strcat "EXPLORER /select, " (getvar "dwgprefix") (getvar "dwgname")", /e"))
   (princ)
)

Title: Re: Open to directory not working anymore
Post by: ronjonp on June 22, 2007, 03:14:52 PM
I like it :)
Title: Re: Open to directory not working anymore
Post by: Patrick_35 on June 23, 2007, 04:48:27 PM
Hi
For the fun with Activex

Code: [Select]
(defun explore(dir / sh)
  (vlax-invoke-method (setq sh (vlax-create-object "Shell.Application")) 'explore dir)
  (vlax-release-object sh)
)

Code: [Select]
(explore "c:\\windows")
@+