Proplem with shell command

Proplem with shell command

Anonymous
Not applicable
621 Views
5 Replies
Message 1 of 6

Proplem with shell command

Anonymous
Not applicable
Hi
I am using AutoCAD 2007 for customization through VBA.I am using a shell command for opening a pdf document,the code written for Commandbutton click event is like this

Shell "AC:\Program files\Adobe\Acrobat 6.0\Reader\AcroRd.exe c:\myfile.pdf"

This code was working fine for many days but suddenly i am getting an error message 'Invalid procedure call or Argument'
Can any one tell be what would be the problem or any other method to open pdf document through AutoCAD VBA.
Thanks.
0 Likes
622 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Whats this all about...

"Shell "AC:\Program...." "AC...??"

Is that a valid root drive?

G'Luck

Bob Coward
0 Likes
Message 3 of 6

Anonymous
Not applicable
I am sorry it is onle"C" not AC
0 Likes
Message 4 of 6

Anonymous
Not applicable
If it was working but now it's not, I would look at has anything changed
about the version of acrobat reader.

Joe
--

wrote in message news:5207125@discussion.autodesk.com...
I am sorry it is onle"C" not AC
0 Likes
Message 5 of 6

Anonymous
Not applicable
Benny,

Check out this PDF from the Adobe partners area which might assist you with what we can't see.

partners.adobe.com/public/developer/ en/acrobat/PDFOpenParameters.pdf

G'Luck,

Bob Coward
0 Likes
Message 6 of 6

Anonymous
Not applicable
Here's a lisp solution that will open a pdf using the autocad browser command, this would eliminate the need to use the shell command.

You can adapt it to vba using the sendcommand

(defun C:pdffile ()

(setq save_cmdecho (getvar "cmdecho"))

(setvar "cmdecho" 0)

;Change the following file path to match your file location

(setq file "C:\\adobe.pdf")

(command "BROWSER" file)

(setvar "cmdecho" save_cmdecho)

;Clean Exit

(princ)

);defun

(princ)

Good Luck
0 Likes