This avoids any browser related issues which can arise if you use the AutoCAD "BROWSER" command.
It makes no assumptions regarding the application (or it's version) used to open a PDF document, or the presence of a properly configured PGP file.
;;;==============================
;;; LISP EXAMPLE
;;;==============================
(defun C:LaunchPDF (/ shell)
(vl-load-com)
(setq filename "\\\\server\\share\\mydoc.pdf")
(setq shell
(vla-getinterfaceobject
(vlax-get-acad-object)
"Shell.Application"
)
)
(vlax-invoke-method shell 'Open filename)
(vlax-release-object shell)
)
'================================
' VBA EXAMPLE
'================================
Private Sub LaunchPDF()
Dim fn As String, objShell As Object
fn = "\\server\share\mydoc.pdf"
Set objShell = CreateObject("Shell.Application")
objShell.Open (fn)
Set objShell = Nothing
End Sub
Labels: pdf, Programming, Tips
PermaLink Posted 11/22/2005 02:00:00 PM
3 COMMENTS!
Comment from: Avatart
Date: April 3, 2008 at 7:53:00 AM CDT
That Lisp example was exactly what I was looking for, thanks.
Avatart (AUGI)
Comment from:
Date: August 12, 2008 at 6:27:00 PM CDT
does this routine work with autocad 2008? can anyone confirm it please?
Comment from: R.K. McSwain
Date: August 13, 2008 at 6:30:00 AM CDT