This document is archived and information here might be outdated.  Recommended version.


IGlobeViewUtil.QueryVisibleGeographicExtent Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > GlobeCore > ESRI.ArcGIS.GlobeCore > Interfaces > IG > IGlobeViewUtil Interface > IGlobeViewUtil.QueryVisibleGeographicExtent Method
ArcGIS Developer Help

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