Create Magnifier Window


Use this subroutine to create a new magnifier window. Mangifier windows are created in ArcMap using the 'Magnifier...' command on the 'Windows' menu. In this case the zoom factor is set to 200% instead of 400%.

How to use:
  1. Paste the code into VBA.
  2. Modify the zoom percent as desired.
  3. Run the macro.
Public Sub CreateMagnifierWindow()
  Dim pMapInset As IMapInset
  Dim pMapInsetWindow As IMapInsetWindow
  Dim pDataWindowFactory As IDataWindowFactory
  Set pDataWindowFactory = New MapInsetWindowFactory
  If pDataWindowFactory.CanCreate(Application) Then
    Set pMapInsetWindow = pDataWindowFactory.Create(Application)
    Set pMapInset = pMapInsetWindow.MapInset
    'Set the zoom percent to 200%
    pMapInset.ZoomPercent = 200
    pMapInsetWindow.Show True
  End If

End Sub