縮尺を変更すると ActiveView の Extent はどのように変化するか


'縮尺を変更するとActiveViewのExtentはどのように変化するか
Sub test()

Dim pMxDoc As IMxDocument
Set pMxDoc = ThisDocument

Dim dblA(5) As Double
Dim dblB(5) As Double

dblA(0) = pMxDoc.ActiveView.Extent.XMax
dblA(1) = pMxDoc.ActiveView.Extent.XMin
dblA(2) = pMxDoc.ActiveView.Extent.YMax
dblA(3) = pMxDoc.ActiveView.Extent.YMin
dblA(4) = dblA(0) - dblA(1)
dblA(5) = dblA(2) - dblA(3)

'Debug.Print "元", dblA(0), dblA(1)
Debug.Print "元幅", dblA(0) - dblA(1), "元高", dblA(2) - dblA(3)


pMxDoc.FocusMap.MapScale = pMxDoc.FocusMap.MapScale * 2

dblB(0) = pMxDoc.ActiveView.Extent.XMax
dblB(1) = pMxDoc.ActiveView.Extent.XMin
dblB(2) = pMxDoc.ActiveView.Extent.YMax
dblB(3) = pMxDoc.ActiveView.Extent.YMin
dblB(4) = dblB(0) - dblB(1)
dblB(5) = dblB(2) - dblB(3)

'Debug.Print "後", dblB(0), dblB(1)
Debug.Print "後幅", dblB(0) - dblA(1), "後高", dblB(2) - dblA(3)


Debug.Print "差幅", dblB(4) - dblA(4), "差高", dblB(5) - dblA(5)

pMxDoc.ActiveView.Refresh

'結論
'縮尺を2倍小さく(数値は大きく)すると,ActiveViewに表示される面積は4倍(距離は2倍)になる

End Sub