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


IEngineEditLayers.SetTargetLayer Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Controls)  

IEngineEditLayers.SetTargetLayer Method

Sets the EngineEditor's target layer and subtype for new features.

[Visual Basic .NET]
Public Sub SetTargetLayer ( _
    ByVal Layer As IFeatureLayer, _
    ByVal SubType As Integer _
)
[C#]
public void SetTargetLayer (
    IFeatureLayer Layer,
    int SubType
);
[C++]
HRESULT SetTargetLayer(
  IFeatureLayer* Layer,
  long SubType
);
[C++]

Parameters Layer [in]
Layer is a parameter of type IFeatureLayer SubType [in] SubType is a parameter of type long

Product Availability

Available with ArcGIS Engine.

Description

Use this method to set the EngineEditor's target layer. The target layer is the layer that new features are typically written to by commands or edit tasks. For example, the "Create New Feature" task creates new features and stores them in the target layer.

If the ControlsEditingTargetToolControl is present it automatically sets the target layer to be the first editable layer in the map when editing starts and it's layer list will be updated when this method is called.

This method should only be called for those layers where IEngineEditLayers::IsEditable returns a True value. To programmatically edit features in an editable layer you do not have to call the SetTargetLayer method.

 

 

Remarks

This method fires IEngineEditEvents::OnTargetLayerChanged and IEngineEditEvents::OnSketchModified.

See Also

IEngineEditLayers Interface