com.esri.arcgis.systemUI
Interface IToolSelectedLayer

All Superinterfaces:
Serializable
All Known Implementing Classes:
Controls3DAnalystContourTool, Controls3DAnalystSteepestPathTool, ControlsSelectAllCommand, ControlsSwitchSelectionCommand, EngineNetworkAnalystEnvironment

public interface IToolSelectedLayer
extends Serializable

Provides access to members that set and get the current selected layer, which selection commands and tools works on.

Description

Implement the IToolSelectedLayer interface if you are creating a custom Command that operates with a currently 'selected' layer.

This interface is typically used when creating commands to work with the MapControl, PageLayoutControl, ToolbarControl, SceneControl and GlobeControl. If a custom command is created to work with only ArcMap use the IMxDocument::SelectedLayer property instead.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 int getLayerIndex()
          The index of selected layer.
 void setLayerIndex(int layerIndex)
          The index of selected layer.
 

Method Detail

setLayerIndex

void setLayerIndex(int layerIndex)
                   throws IOException,
                          AutomationException
The index of selected layer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
layerIndex - The layerIndex (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayerIndex

int getLayerIndex()
                  throws IOException,
                         AutomationException
The index of selected layer.

Description

The index of the currently 'selected' layer that the Command operates with.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The layerIndex
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.