ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Editing Namespace / EditOperation Class / SetOnRedone Method
The action to take when this operation is redone.
Example

In This Topic
    SetOnRedone Method
    In This Topic
    Sets an action that will be called when this EditOperation is redone.
    Syntax
    Public Sub SetOnRedone( _
       ByVal callback As Action _
    ) 
    public void SetOnRedone( 
       Action callback
    )

    Parameters

    callback
    The action to take when this operation is redone.
    Example
    SetOnUndone, SetOnRedone, SetOnComitted
    // Demonstrates how to use the <see cref="ArcGIS.Desktop.Editing.EditOperation"/> methods  <see
    await QueuedTask.Run(() =>
      {
        // SetOnUndone, SetOnRedone and SetOnComitted can be used to manage 
        // external actions(such as writing to a log table) that are associated with 
        // each edit operation.
    
        //get selected feature and update attribute
        var selectedFeatures = MapView.Active.Map.GetSelection();
        var testInspector = new Inspector();
        testInspector.Load(selectedFeatures.ToDictionary().Keys.First(), selectedFeatures.ToDictionary().Values.First());
        testInspector["Name"] = "test";
    
        //create and execute the edit operation
        var updateTestField = new EditOperation() { Name = "Update test field" };
        updateTestField.Modify(testInspector);
    
        //actions for SetOn...
        updateTestField.SetOnUndone(() =>
        {
          //Sets an action that will be called when this operation is undone.
          Debug.WriteLine("Operation is undone");
        });
    
        updateTestField.SetOnRedone(() =>
        {
          //Sets an action that will be called when this edit operation is redone.
          Debug.WriteLine("Operation is redone");
        });
    
        updateTestField.SetOnComitted(b =>
        {
          // Sets an action that will be called when this edit operation is committed.
          Debug.WriteLine("Operation is committed");
        });
    
        if (!updateTestField.IsEmpty)
        {
          var result = updateTestField.Execute(); //Execute and ExecuteAsync will return true if the operation was successful and false if not
        }
      });
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also