UnloadDVB Method (ActiveX)

Unloads the specified AutoCAD VBA project file.

Supported platforms: Windows only

Signature

VBA:

object.UnloadDVB Name
object

Type: Application

The object this method applies to.

Name

Access: Input-only

Type: String

The name of the .dvb project to unload.

Return Value (RetVal)

No return value.

Remarks

No additional remarks.

Examples

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

Visual 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!")
)