ArcObjects Library Reference (GlobeCore)  

IGlobeViewUtil.QueryVisibleGeographicExtent Method

Visible geographic extent of Globe sphere.

[Visual Basic .NET]
Public Sub QueryVisibleGeographicExtent ( _
    ByVal Extent As IEnvelope _
)
[C#]
public void QueryVisibleGeographicExtent (
    IEnvelope Extent
);
[C++]
HRESULT QueryVisibleGeographicExtent(
  IEnvelope* Extent
);
[C++]

Parameters

Extent

  Extent is a parameter of type IEnvelope

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.
[C#]

The following code allows you to get the current visible geographic extent.

public void Get_VisibleGeographicExtent(IGlobe globe)
{

  ESRI.ArcGIS.GlobeCore.IGlobeDisplay globeDisplay = globe.GlobeDisplay;
  ESRI.ArcGIS.Analyst3D.IScene scene = (ESRI.ArcGIS.Analyst3D.IScene)globeDisplay.Scene;
  ESRI.ArcGIS.Analyst3D.ISceneViewer sceneViewer = globeDisplay.ActiveViewer;
  ESRI.ArcGIS.Analyst3D.ICamera camera = sceneViewer.Camera;
  ESRI.ArcGIS.GlobeCore.IGlobeCamera globeCamera = camera;
  ESRI.ArcGIS.GlobeCore.IGlobeViewUtil globeViewUtil = globeCamera;
  ESRI.ArcGIS.Geometry.IEnvelope extent = new ESRI.ArcGIS.Geometry.EnvelopeClass();

  globeViewUtil.QueryVisibleGeographicExtent(extent);

}

See Also

IGlobeViewUtil Interface