vla-getremotefile Automation Error

Hi,

I have an update utility based on the following code (thanks to Darren Young)

(defun c:test (/ objDOC objUTL locfile)
(vl-load-com)
(setq objDOC (vla-get-activedocument (vlax-get-acad-object)))
(setq objUTL (vla-get-utility objDOC))
(vla-getremotefile
objUTL
"http://www.uspconnectors.com/cad/product/hc520.dwg"
'locfile
:vlax-true
)
(alert (strcat "File downloaded here -> " locfile))
(princ)
)

which gives the following error in Bricscad...

; error : Automation Error 80020009; Error accessing [GETREMOTEFILE] method. ErrIndex=0

Do I need to make changes to this code for it to work in Bricscad?

Thanks

Comments

  • David, I was pointed to the object browser in the vba editor as a means of checking if methods I was trying to use have been implemented. Find the object and method in the browser and when it is selected there is a description displayed at the bottom. It show BricscadApp.AcadUtility.GetRemoteFile is not implemented yet.

    Bricsys support is really good. If you send in a support request you will be able to find out if the method is scheduled for implementation and when it is expected.

  • Dear David,

    have you ever tried (vla-getremotefile) in Acad ??
    As I implemented the Lisp engine, I tried it many times in Acad, and it never worked :-)
    Same results I got from other Lisp developers ... they tried in ACad, but did never work.

    So even if that function is implemented once in Bricscad COM (where it is not yet implemented),
    the chances are really big that code will not work ...

    So it is better to use other approaches ... like file download via System COM libraries
    (not sure whether these is such stuff ...)

  • Thanks for the tip Greg, I will have a look at the object browser to get a better understanding of various functions status.  I had thought vla-getremotefile was included after reviewing the reference of available functions in the help file (which I assumed had been inherited from the LT-Extender code).

    Torsten, vla-getremotefile works very well in AutoCAD, I use it as part of an automatic update function.  I've tested it from 2004 upwards and never had problems with it - even if the remote file is not found it returns a web site's error page which can be checked before processing further.  I've tested it in firewalled network environments and found it still works!  Essentially I use a modified version of the above code.  You can copy and paste the above into AutoCAD - the file specified in the code is available and will return a result.  

    It would be great to have it working in Bricscad but if it is not feasible, will  have to look at COM methods.

    Thanks

  • Dear David,
    many thanks !!!
    I will immediately test your code ... and will care to get this implemented in Bricscad.
    However, you could also file a support request on (vla-getremotefile), so we have the
    problem in our database.

    Again, many thanks !!

  • Dear David,

    indeed, it works in Acad - and LT-Extender as well :-)
    So know I know what I did wrong with testing ... thank you !

This discussion has been closed.