ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Framework Namespace / OperationManager Class / CreateCompositeOperation Method
The method to call.
The name of the new operation.

In This Topic
    CreateCompositeOperation Method
    In This Topic
    Groups existing operations into a single composite operation. This method must be called on the primary worker thread. Use QueuedTask.Run.
    Syntax
    public void CreateCompositeOperation( 
       Action action,
       string name
    )
    Public Sub CreateCompositeOperation( _
       ByVal action As Action, _
       ByVal name As String _
    ) 

    Parameters

    action
    The method to call.
    name
    The name of the new operation.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run
    Remarks

    Many API calls will automatically create operations and add them to the appropriate operation stack (OperationManager). If your function produces adds several operations to the stack and you instead only want to see one operation, use this function to group them.

    Note, operations belonging to different categories cannot be interleaved. When a composite operation is being created, every operation belonging to a different ArcGIS.Desktop.Framework.Contracts.Operation.Category will start a new ArcGIS.Desktop.Framework.Contracts.CompositeOperation. For example, if your method calls five functions (A [category: Editing], B [Editing], C [Mapping], D [Mapping], E [Editing]), three composite operations will be created as two additional category shifts have occurred (Editing, Mapping, Editing).

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also