Uploads a file to a remote FTP location specified by a URL known to AutoCAD.
Supported platforms: Windows only
VBA:
object.PutRemoteFile URL, LocalFile
Type: Utility
The object this method applies to.
Access: Input-only
Type: String
The URL location to upload the file to.
Access: Input-only
Type: String
The file to upload.
No return value.
This method is designed to complement the GetRemoteFile method.
When a secure URL is accessed, a dialog box prompts the user for the necessary password information. Message boxes appear if the user has not suppressed this activity in their browser.
VBA:
Sub Example_PutRemoteFile() ' This example transfers a local file to a remote URL. Since this example ' relies on both a remote server name and a local file, you will have to ' modify both the DestURL and LocalFile variables below to run this example. Dim DestURL As String, LocalFile As String ' Define source and destination DestURL = "ftp://www.myserver.com/autocadfiles/" LocalFile = "c:\program files\autocad\sample\city map.dwg" ' Transfer local file to remote location ThisDrawing.Utility.PutRemoteFile DestURL, LocalFile MsgBox LocalFile & " was just transfered to: " & DestURL End Sub
Visual LISP:
(vl-load-com) (defun c:Example_PutRemoteFile() ;; This example transfers a local file to a remote URL. Since this example ;; relies on both a remote server name and a local file, you will have to ;; modify both the DestURL and LocalFile variables below to run this example. (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) ;; Define source and destination (setq DestURL "ftp://www.myserver.com/autocadfiles/") (setq LocalFile "C:\\autocad\\samples\\city map.dwg") ;; Transfer local file to remote location (vla-PutRemoteFile (vla-get-Utility doc) DestURL LocalFile) (alert (strcat LocalFile " was just transfered to: " DestURL)) )