Activate Method (ActiveX)

Makes the specified drawing active.

Supported platforms: Windows only

Signature

VBA:

object.Activate
object

Type: Document

The object this method applies to.

Return Value (RetVal)

No return value.

Remarks

No additional remarks.

Examples

VBA:

Sub Example_ActivateMethod()
    ' This example creates two new drawings and activates each drawing in turn.
    
    Dim NewDrawing1 As AcadDocument
    Dim Newdrawing2 As AcadDocument
    Set NewDrawing1 = ThisDrawing.Application.Documents.Add("")
    Set Newdrawing2 = ThisDrawing.Application.Documents.Add("")
    
    Dim drawing As AcadDocument
    For Each drawing In ThisDrawing.Application.Documents
        drawing.Activate
        MsgBox "Drawing " & drawing.name & " is active."
    Next drawing
End Sub

Visual LISP:

Not available