com.esri.arcgis.editor
Interface IEditLayers

All Superinterfaces:
Serializable
All Known Implementing Classes:
Editor, IEditLayersProxy

public interface IEditLayers
extends Serializable

Provides access to members that control information about layers in the edit session.

Remarks

The IEditLayers interface is used to access information about layers involved in an edit session. For example, use IEditLayers to determine if a particular layer involved in an edit session is editable or not; in addition,
use IEditLayers to check or set the editor’s current layer and current subtype.

The current layer (or target layer) determines which layer will receive newly created features. Edit tasks and commands that create new features use this property to determine to which layer to write out the new features.

When To Use

The IEditLayers interface exposes members for setting and getting the editor's current layer and current subtype. The current layer (or target layer) determines which layer will contain newly created features. For instance, if you set the target layer to 'Buildings', any new features created will be part of the Buildings layer. Edit tasks and commands that create new features use this property to determine which layer to write out the new features to. For example, the 'Create New Features' task and the 'Union' command both create new features in the target layer.

Product Availability

Available with ArcGIS Desktop.

See Also:
ISnapEnvironment, IFeatureLayer, IEditProperties, IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask), IEditor, IEditLayers, IEditTask.deactivate(), IEditAttributeProperties, IEditEvents2, IEditTask.onFinishSketch(), IDatasetEdit, IDatasetEditInfo, IEditTask.onDeleteSketch(), IEditTask.getName(), IEditEvents, Editor, IEditSketch

Method Summary
 IFeatureLayer getCurrentLayer()
          Indicates the editor's target layer which new features are added to.
 int getCurrentSubtype()
          The sub type for new features in the CurrentLayer.
 boolean isEditable(IFeatureLayer layer)
          Determines if a specific feature layer is editable.
 void setCurrentLayer(IFeatureLayer layer, int subtype)
          The editor's target layer and subtype for new features.
 

Method Detail

setCurrentLayer

void setCurrentLayer(IFeatureLayer layer,
                     int subtype)
                     throws IOException,
                            AutomationException
The editor's target layer and subtype for new features.

Remarks

Use this method to set the editor's current layer. Use the CurrentLayer property to check the current layer. The current layer is the layer that new features are typically written to. For example, the CreateNewFeature Task, the Buffer command, and the CopyParallel command all create new features and store them in the current layer. Custom tools and tasks do not have to model this behavior. All layers that return TRUE for IsEditable, are editable simulataneously. To edit features in a particular layer, you do not have to call the SetCurrentLayer method for that layer.

If you want to set the current layer to a layer that does not have subtypes, use a zero for the required subtype index parameter.

Each time this property is set, a new empty geometry is automatically created in the Editor object and is accessable through IEditSketch::Geometry. The type of geometry created is equal to that of the layer. This default behavior is easily overrideable by setting IEditSketch::Geometry manually; this does not affect the CurrentLayer property.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
layer - A reference to a com.esri.arcgis.carto.IFeatureLayer (in)
subtype - The subtype (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCurrentLayer

IFeatureLayer getCurrentLayer()
                              throws IOException,
                                     AutomationException
Indicates the editor's target layer which new features are added to.

Remarks

Use this property to check the editor's current layer. Use the SetCurrentLayer property to set the current layer. The current layer is the layer that new features are typically written to. For example, the CreateNewFeature Task, the Buffer command, and the CopyParallel command all create new features and store them in the current layer. Custom tools and tasks do not have to model this behavior. All layers that return TRUE for IsEditable, are editable simulataneously. To edit features in a particular layer, you do not have to call SetCurrentLayer method for that layer.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Returns:
A reference to a com.esri.arcgis.carto.IFeatureLayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCurrentSubtype

int getCurrentSubtype()
                      throws IOException,
                             AutomationException
The sub type for new features in the CurrentLayer.

Remarks

Returns the current subtype code for the current layer. If the CurrentLayer does not have subtypes, 0 is returned.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

isEditable

boolean isEditable(IFeatureLayer layer)
                   throws IOException,
                          AutomationException
Determines if a specific feature layer is editable.

Remarks

Use the IsEditable method to check if a particular layer is editable. For example, when the editor is started, it calls this method for each layer added to the Map. The layers that are editable are added to the editing environment.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
layer - A reference to a com.esri.arcgis.carto.IFeatureLayer (in)
Returns:
The pEditable
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.