This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ESRI.ArcGIS.Snippets > Snippets > Get SceneViewer from SceneControl Snippet (ArcObjects .NET 10.4 SDK) |
Obtain an ISceneViewer interface from an AxSceneControl.
/// <summary> /// Obtain an ISceneViewer interface from an AxSceneControl. /// </summary> /// <param name="sceneControl">An AxSceneControl</param> /// <returns>An ISceneViewer interface.</returns> /// <remarks>An ISceneViewer interface can also be obtained by IGlobeDisplay.ActiveViewer</remarks> public ESRI.ArcGIS.Analyst3D.ISceneViewer GetSceneViewerFromSceneControl(ESRI.ArcGIS.Controls.SceneControl sceneControl) { ESRI.ArcGIS.Analyst3D.ISceneViewer sceneViewer=sceneControl.SceneViewer; return sceneViewer; }
''' <summary> ''' Obtain an ISceneViewer interface from an AxSceneControl. ''' </summary> ''' <param name="sceneControl">An AxSceneControl</param> ''' <returns>An ISceneViewer interface.</returns> ''' <remarks>An ISceneViewer interface can also be obtained by IGlobeDisplay.ActiveViewer</remarks> Public Function GetSceneViewerFromSceneControl(ByVal sceneControl As ESRI.ArcGIS.Controls.SceneControl) As ESRI.ArcGIS.Analyst3D.ISceneViewer Dim sceneViewer As ESRI.ArcGIS.Analyst3D.ISceneViewer=sceneControl.SceneViewer Return sceneViewer End Function