Using the SceneControl

In this topic

About the SceneControl

The SceneControl corresponds to the 3D view in ArcScene and provides a way to view and investigate small spatial data layers in 3D. The SceneControl requires a 3D Analyst extension.

Scene objects

The SceneControl encapsulates an object implementing ISceneViewer. This is the same ISceneViewer ArcObjects found inside the ArcScene application. ISceneViewer contains a getCamera() method that returns an ICamera, and the ICamera contains get/set methods for Observer and Target position.
The SceneControl provides shortcuts to frequently used properties and methods on the object it encapsulates. For example, the SceneControl has get/set methods for Camera, Scene, SceneGraph, and SceneViewer. For more information about these objects, see the 3DAnalyst library overview.

Loading scene documents

Scene documents can be set at design time through the SceneControl property editor (in development environments that support property page capability). The SceneControl attempts to load this document when it is created. Alternatively, a scene document can be loaded into the SceneControl programmatically using the checkSxFile() method to determine whether the document is valid and the loadSxFile() method to load in the scene document. See the following code example:
String ArcGISInstallDir = System.getenv("AGSDEVKITJAVA");
String filePath = ArcGIsInstallDir + "java/samples/data/scenedata/Groundwater.sxd";
if (sceneControl1.checkSxFile(filePath))

Navigation functionality

The SceneControl has built-in navigation functionality that can be turned on at design time through the SceneControl property editor or programmatically with the setNavigate() method. This functionality enables the end user to use the mouse button to navigate backward, forward, and to the left and right of the display, and the right mouse button to zoom in to and out from the display.

See Also:

Controls library overview
How to get started with SceneControl property pages
Sample: SceneBean, TOCBean, ToolbarBean

Development licensingDeployment licensing
Engine Developer KitEngine: 3D Analyst
ArcGIS for Desktop Basic: 3D Analyst
ArcGIS for Desktop Standard: 3D Analyst
ArcGIS for Desktop Advanced: 3D Analyst