Jump to content

Recommended Posts

Posted

Hi,

 

In the older IE's and other browsers this type of url is no problem. http(s)://username:password@server/bron.ext

But since some M$ update u cant use it anymore in IE. And yes autocad is using the IE engine.

 

Thx btw to renderman for providing this wonderfull code

 

(defun L12_GetFileFromURL  (url path / utilObj tempPath newPath)
 ;; © RenderMan 2011, CADTutor.net
 ;; Example: (download "http(s)://username:password@server/source.ext" (getvar 'dwgprefix))
 (vl-load-com)
 (setq utilObj (vla-get-utility
                 (vla-get-activedocument (vlax-get-acad-object))))
 (if (= :vlax-true (vla-isurl utilObj url))
   (if (vl-catch-all-error-p
         (vl-catch-all-apply
           'vla-GetRemoteFile
           (list utilObj url 'tempPath :vlax-true)))
     (prompt "\n  <!>  Error Downloading File From URL  <!> ")
     (progn
       (if (findfile
             (setq newPath
                    (strcat path
                            (vl-filename-base url)
                            (vl-filename-extension url))))
         (vl-file-rename
           newPath
           (setq voidPath
                  (strcat
                    (vl-filename-directory newPath)
                    "\\void_"
                    (vl-filename-base newPath)
                    "_"
                    (menucmd
                      "M=$(edtime,$(getvar,date),YYYY-MO-DD-HH-MM-SS)")
                    (vl-filename-extension newPath)))))
       (vl-file-copy tempPath newPath)
       (vl-file-delete tempPath)))
   (prompt "\n  <!>  Invalid URL  <!> "))
 (vl-catch-all-apply 'vlax-release-object (list utilObj))
 (princ)
)

 

 

Is it posible to download a file from a secure http location in lisp?

Or is it posible to find a workaround for my litle (LOL) problem here :)

 

More info on the subject from m$

http://support.microsoft.com/kb/834489

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...