LayoutSwitched Event (ActiveX)

Triggered after the user switches to a different layout.

Supported platforms: Windows only

Signature

VBA:

object.LayoutSwitched(LayoutName)
object

Type: Document

An object expression that evaluates to a valid container object. In this case, the only valid container is a document.

LayoutName

Type: String; input to the handler

The name of the layout the user has switched to.

Remarks

No events will be fired while a modal dialog is being displayed.

Examples

VBA:

Private Sub AcadDocument_LayoutSwitched(ByVal LayoutName As String)
    ' This example intercepts a drawing LayoutSwitched event.
    '
    ' This event is triggered when the user switches to a different
    ' drawing layout view.
    '
    ' To trigger this example event: Open a drawing and change its layout view
    '
    ' For example: Switch the drawing from Model view to Layout1 view

    ' Use the "LayoutName" variable to determine the which layout view we changed to
    MsgBox "The drawing layout was just changed to: " & LayoutName
End Sub

Visual LISP:

Not available