Use this subroutine to create a new magnifier window. Magnifier 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
- Paste the code into VBA.
- Modify the zoom percent as desired.
- 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