PutRemoteFile 方法 (ActiveX)
将文件上载到 AutoCAD 已知的 URL 指定的远程 FTP 位置。 支持的平台:仅限 Windows 签名VBA: object.PutRemoteFile URL, LocalFile
返回值 (RetVal)无返回值。 言论该方法旨在补充该方法。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
可视化 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))
)
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-10-31 02:46
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.