Author Topic: Launch pdf from sharepoint without invoking an internet program.  (Read 229 times)

0 Members and 1 Guest are viewing this topic.

Lonnie

  • Newt
  • Posts: 179
I have lsip that opens Microsoft Edge and then launches my default PDF reader using a function called. Here's the code
(If someone knows who should get credit for this I am more than willing to remark it
Code: [Select]
(defun launchpdf (pdfname / shell)
  (vl-load-com)
  (setq pdfname (vl-string-translate "|" "\\" pdfname))
  (setq shell
        (vla-getinterfaceobject
          (vlax-get-acad-object)
          "Shell.Application"
        )
  )
  (vlax-invoke-method shell 'Open pdfname)
  (vlax-release-object shell)
  (princ)
)

(defun c:cheats ()
  (launchpdf "https://teams.company/revit//revitblog/PublishingImages/New%20user%20Packet/cheatsheet.pdf")
)


However, I'm encountering an issue with hosting a PDF cheatsheet on our company server. Currently, I'm only able to access it via an HTTPS link. Is there a workaround to enable me to keep the cheatsheet on our company server? If I launch the pdf off my computer it works the way I want.

Code: [Select]
(defun c:cheats ()
  (launchpdf "\\\\dt-lshaw2\\dcapps\\help.pdf")
)

Unfortunately, IT has been unable to provide a non-HTTPS link. Any suggestions on how to resolve this would be appreciated."

BIGAL

  • Swamp Rat
  • Posts: 1423
  • 40 + years of using Autocad
Re: Launch pdf from sharepoint without invoking an internet program.
« Reply #1 on: May 10, 2024, 10:16:27 PM »
Seem to remember open a pdf direct just like this (startapp "notepad" "D:\\acadtemp\\test.lsp")

Something a simple as (command "_start" "D:\\acadtemp\\newblock-02.pdf") Worked in my Bricscad.
A man who never made a mistake never made anything

Lonnie

  • Newt
  • Posts: 179
Same result. It tries to open the link

https://teams.company/revit//revitblog/PublishingImages/New%20user%20Packet/cheatsheet.pdf

in edge then launches bluebeam.