Dim pMxDocument As IMxDocument Set pMxDocument = ThisDocument Dim pActiveView As IActiveView Set pActiveView = pMxDocument.ActiveView Dim pNewEnvelope As IEnvelope Set pNewEnvelope = New Envelope Dim pMap As IMap Set pMap = pMxDocument.FocusMap pMap.AreaOfInterest = pNewEnvelope '[全体表示の表示範囲] の範囲をカスタマイズ pMap.AreaOfInterest = Nothing '全てのレイヤの表示範囲(デフォルト)に設定 Dim pEnvelope As IEnvelope Set pEnvelope = pActiveView.FullExtent Dim pGeometry As IGeometry2 Set pGeometry = pEnvelope Debug.Print pEnvelope.XMax ' Dim pProjectedCoordinateSystem As IProjectedCoordinateSystem Set pProjectedCoordinateSystem = pGeometry.SpatialReference pGeometry.Project pProjectedCoordinateSystem.GeographicCoordinateSystem '同じ測での投影変換になるのでProjectExである必要はない Debug.Print pEnvelope.XMax '[度] チェックで表示
マップの全体表示に対するカスタム範囲を設定
2016/9/1 (木)