AutoCAD が認識した URL で指定されたリモート FTP 位置にファイルをアップロードします。
サポートされているプラットフォーム: Windows のみ
VBA:
object.PutRemoteFile URL, LocalFile
タイプ: Utility
このメソッドが適用されるオブジェクト。
アクセス: 入力のみ
タイプ: 文字列
ファイルをアップロードする先の URL 位置。
アクセス: 入力のみ
タイプ: 文字列
アップロードするファイル。
戻り値はありません。
このメソッドは GetRemoteFile メソッドと補完し合うように作られています。
セキュア URL にアクセスするとき、パスワードの入力を求めるダイアログ ボックスが表示されます。このときに、メッセージ ボックスも表示されます(ブラウザでこの動作をオフにしていない場合)。
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))
)