Visual Basic Customization

Posts: 4
Registered: ‎05-28-2008
Message 1 of 2 (188 Views)

Is this possible with GetRemoteFile method

188 Views, 1 Replies
05-20-2009 01:12 PM
I'm trying to download a .dvb file from my Web site and load it locally into AutoCAD. I can download with the Getremotefile method with out any problems. The problem is with the downloaded file, it is unusable. When I try to load the file manually I get a message indicating 'unable to load file'. In comparing the downloaded file size with the file on my Web server, the downloaded file is considerably smaller.

So, hopefully someone can tell me if I'm doing something wrong?

Dim strURL As String
Dim strLocalName As String

strUrl = "http://DomainName/myFile.dvb"

thisDrawing.utility.getremotefile strUrl, strLocalName, true

Thanks in advance!
Posts: 15
Registered: ‎10-29-2007
Message 2 of 2 (188 Views)

Re: Is this possible with GetRemoteFile method

04-19-2010 11:32 PM in reply to: Eddie68
Hi Eddie
I hope this code help you

strLocalFilePath = "c:\storedfile"
strLocalFile = ""
strLocalUrl = strLocalFilePath & "\ACAD\" & "myFile.dvb"
strRemoteUrl = "http://DomainName/myFile.dvb"
Utility.GetRemoteFile(strRemoteUrl, strLocalFile, True)
On Error Resume Next
FileSystem.MkDir(strLocalFilePath & "/ACAD")
FileSystem.FileCopy(strLocalFile, strLocalUrl)
On Error GoTo 0
If Utility.IsRemoteFile(strLocalFile, strRemoteUrl) Then
boolDownload = True
boolDownload = False
End If

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community