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


IEditTask.Activate Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Editor)  

IEditTask.Activate Method

Called by the editor when the task becomes active.

[Visual Basic .NET]
Public Sub Activate ( _
    ByVal Editor As IEditor, _
    ByVal oldTask As IEditTask _
)
[C#]
public void Activate (
    IEditor Editor,
    IEditTask oldTask
);

Product Availability

Available with ArcGIS Desktop.

Remarks

Activate is called each time the editor's current task is changed. This gives you the ability initialize variables, namely set a reference to the passed in Editor object, and modify the editing environment before work starts with an edit task. For example, you may want the edit sketch to be of type Polyline regardless of what the current layer geometry type is. By default the edit sketch has a geometry type equal to that of the current layer, override this by changing the editor's geometry type in Activate.
 

See Also

IEditTask Interface | IEditor Interface | IEditAttributeProperties Interface | IEditSketch Interface | IExtension Interface