***autocad shell active***

***autocad shell active***

DRW_CAD
Collaborator Collaborator
1,691 Views
5 Replies
Message 1 of 6

***autocad shell active***

DRW_CAD
Collaborator
Collaborator

Not sure if this is the correct place for this but...

 

I'm creating a series of "Help files" palettes. They consist of SHELL commands that launch either a PDF or an MP4. 

 

I'm using the following macros to launch them: 

 

^C^C SHELL"Using client Xref Title Borders.pdf";

 

then the various files are accessed from a mapped support directory. 

 

It works great with the MP4s but with the PDFs, unless Adobe reader is already open, it leaves a command prompt open with ***autocad shell active*** at the top. 

 

I feel like this should be easy but... I haven't been able to get that to close after the PDF opens. Any thoughts appreciated. 

0 Likes
Accepted solutions (1)
1,692 Views
5 Replies
Replies (5)
Message 2 of 6

jwhite
Advocate
Advocate

I use HTML help files with this macro:

^C^C(startapp "C:/Program Files/Internet Explorer/IEXPLORE.EXE" "path&filename.htm")

You can try using reader with  PDFs instead or save them to HTML.

Message 3 of 6

DannyNL
Advisor
Advisor
Accepted solution

Create and load this LISP

 

(defun ShellOpen (SO_File / SO_Shell)
   (if
      (and
         (= (type SO_File) 'STR)
         (setq SO_File (findfile SO_File))
      )
      (progn
        (setq SO_Shell (vlax-get-or-create-object "Shell.Application"))
        (vlax-invoke SO_Shell 'Open SO_File)
        (vlax-release-object SO_Shell)
      )
   )
)

And use ^C^C(ShellOpen "YourFile") to open the PDF. Make sure the PDF file can be found directly by including the path or through your defined support paths. This function will make use of the Windows file association and try to open the file with the registered application

Message 4 of 6

DRW_CAD
Collaborator
Collaborator

Thanks! That did the trick. 

0 Likes
Message 5 of 6

DRW_CAD
Collaborator
Collaborator

Thanks for your input. I contemplated this but I didn't want to go that route unless I couldn't resolve the issue with PDF. 

0 Likes
Message 6 of 6

DannyNL
Advisor
Advisor

You're welcome. Glad I could help Smiley Happy

0 Likes