ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Desktop.Framework Namespace / OperationManager Class / RedoAsync Method / RedoAsync(Int32,String) Method
The number of operations to restart.
The category of operation to redo.
Example

In This Topic
    RedoAsync(Int32,String) Method
    In This Topic
    The number and category of operations to redo.
    Syntax
    public Task RedoAsync( 
       int count,
       string category
    )
    Public Overloads Function RedoAsync( _
       ByVal count As Integer, _
       ByVal category As String _
    ) As Task

    Parameters

    count
    The number of operations to restart.
    category
    The category of operation to redo.

    Return Value

    A task that represents the work queued to execute in the ThreadPool.
    Example
    Dockpane undo / redo
    {
      // in order to find a dockpane you need to know its DAML id
      pane = FrameworkApplication.DockPaneManager.Find(dockPaneID);
    
      // get the undo stack
      OperationManager manager = pane.OperationManager;
      if (manager != null)
      {
        // undo an operation
        // Use await with UndoAsync and RedoAsync
        if (manager.CanUndo)
        {
          await manager.UndoAsync();
        }
    
        // redo an operation
        if (manager.CanRedo)
        {
          await manager.RedoAsync();
        }
    
        // clear the undo and redo stack of operations of a particular category
        manager.ClearUndoCategory("Some category");
        manager.ClearRedoCategory("Some category");
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also