Author Topic: Shell Application  (Read 1672 times)

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12922
  • London, England
Shell Application
« on: July 27, 2009, 06:53:00 PM »
I was experimenting with the Shell Application (quite a useful little thing!), using this reference

But I cannot seem to get the Explore method to work, any help is of course appreciated.

This is what i have tried so far:

Code: [Select]
(defun c:test (/ shell)
  (vl-load-com)
  (setq shell (vlax-create-object "shell.application"))
  (vlax-invoke shell 'Explore "C:\\Users\\Lee Mac\\Documents\\")
  (vlax-release-object shell)
  (princ))

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Shell Application
« Reply #1 on: July 27, 2009, 08:09:53 PM »
Almost the same?
http://www.theswamp.org/index.php?topic=17149.msg207892#msg207892


But it works for me and yours does not.
« Last Edit: July 27, 2009, 08:43:24 PM by CAB »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Shell Application
« Reply #2 on: July 27, 2009, 08:45:47 PM »
Well this does work for me!
Code: [Select]
(defun c:test (/ shell)
  (vl-load-com)
  (setq shell (vlax-create-object "shell.application"))
  (vlax-invoke shell 'Explore "C:\\Windows")
  (vlax-release-object shell)
  (princ))
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

ronjonp

  • Needs a day job
  • Posts: 7531
Re: Shell Application
« Reply #3 on: July 27, 2009, 11:06:29 PM »
They both work here  :?

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Spike Wilbury

  • Guest
Re: Shell Application
« Reply #4 on: July 27, 2009, 11:22:43 PM »
a maybe - alternative?:

(startapp "explorer" "C:\\Documents and Settings\\HP_Administrator\\Desktop\\MEP")

Lee Mac

  • Seagull
  • Posts: 12922
  • London, England
Re: Shell Application
« Reply #5 on: July 28, 2009, 02:53:33 PM »
Sorry, After rebooting ACAD, it worked fine :)