opening a PDF file

opening a PDF file

Anonymous
Not applicable
387 Views
5 Replies
Message 1 of 6

opening a PDF file

Anonymous
Not applicable
I've looked in previous postings, and one posting suggested the "acadx" website to find info on opening a PDF file from inside Autocad, but apparently acadx no longer exists. Can anyone tell me how to open a PDF file from VBA?

TIA

Albert
0 Likes
388 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
AlbertRKK wrote:
> I've looked in previous postings, and one posting suggested the "acadx" website to find info on opening a PDF file from inside Autocad, but apparently acadx no longer exists. Can anyone tell me how to open a PDF file from VBA?

Do you mean just open the PDF in the registered application
(i.e.: Acrobat Reader)?

If so, see
http://rkmcswain.blogspot.com/2005/11/launch-pdf-from-autocad.html

However, if you mean open the PDF and import the contents
into AutoCAD - that is something different.

--
R.K. McSwain
http://rkmcswain.blogspot.com
0 Likes
Message 3 of 6

Anonymous
Not applicable
Yeah I wanted to just open a PDF file for viewing...that helped me a lot.

Thanks

Albert
0 Likes
Message 4 of 6

Anonymous
Not applicable
using shell command u can open any type of file at AUTOCAD command prompt.

this is vb code to open test.pdf
ThisDrawing.SendCommand "Shell" & vbCr & "E:/test.pdf" & vbCr

and in lisp routine :
(command "shell" "E:/test.pdf")

Cheers
0 Likes
Message 5 of 6

Anonymous
Not applicable
Hi divyasree,

This code assumes you have software installed and registered with
Windows to open a PDF file. Normally you would shell to the relevant
EXE file and pass it the file to be opened as a parameter.


Regards

Laurie

divyasree wrote:
> using shell command u can open any type of file at AUTOCAD command prompt.
>
> this is vb code to open test.pdf
> ThisDrawing.SendCommand "Shell" & vbCr & "E:/test.pdf" & vbCr
>
> and in lisp routine :
> (command "shell" "E:/test.pdf")
>
> Cheers
0 Likes
Message 6 of 6

Anonymous
Not applicable
I'd think that's not an unreasonable assumption; one assumes you have autocad installed when asking .dwg related questions here in the forum.

Since the original question was asked on how to view a pdf, it wouldnt matter what application is registered to pop up when one double clicks a pdf file. And I think a question on how to code an entire PDF viewing application, especially when so many free viewers are available, would be beyond the scope of this NG.
0 Likes