CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoCAD 2023 开发者帮助

UnloadDVB 方法 (ActiveX)

2024-5-18 18:56| 发布者: admin| 查看: 121| 评论: 0|原作者: admin|来自: AutoCAD

UnloadDVB 方法 (ActiveX)

卸载指定的 AutoCAD VBA 项目文件。

支持的平台:仅限 Windows

签名

VBA:

object.UnloadDVB Name
对象

类型: 应用

此方法应用到的对象。

名字

访问:仅输入

类型:字符串

要卸载的 .dvb 项目的名称。

返回值 (RetVal)

无返回值。

言论

没有其他评论。

例子

VBA:

Sub Example_LoadDVB()
    ' This example loads a DVB file and runs a macro
    ' contained in the file using the RunMacro method.
    '
    ' This example uses a DVB file named drawline.dvb.
    ' You should change the example to use a file on your computer.
    '
    ' * Note: If you open a DVB file and then run the example to load it, there will be an error
    ' when the DVB file is unloaded.

    Dim FileName As String
    
    FileName = "c:\drawline.dvb"
    
    ' Load a sample VBA project DVB file
    LoadDVB FileName
    
    ' Run the drawline sample macro
    RunMacro "Module1.Drawline"
    
    ' Unload the drawline VBA project DVB file now.
    UnloadDVB FileName
    
    MsgBox "The DVB file has been run!"
End Sub

可视化 LISP:

(vl-load-com)
(defun c:Example_LoadDVB()
    ;; This example loads a DVB file and runs a macro
    ;; contained in the file using the RunMacro method.
    ;;
    ;; This example uses a DVB file named drawline.dvb.
    ;; You should change the example to use a file on your computer.
    ;;
    ;; * Note: If you open a DVB file and then run the example to load it, there will be an error
    ;; when the DVB file is unloaded.

    (setq FileName (findfile ".\\Sample\\VBA\\drawline.dvb"))
    
    ;; Load a sample VBA project DVB file
    (vla-LoadDVB acadObj FileName)
    
    ;; Run the drawline sample macro
    (vla-RunMacro acadObj "Module1.Drawline")
    
    ;; Unload the drawline VBA project DVB file now.
    (vla-UnloadDVB acadObj FileName)
    
    (alert "The DVB file has been run!")
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1   苏公网安备32011402011833)

GMT+8, 2024-12-15 22:07

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部