ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Editing Namespace / EditOperation Class
Members Example

In This Topic
    EditOperation Class
    In This Topic
    EditOperations are shortlived objects for performing an Edit, they are generally immediately filled with the parameters of the desired edit and executed then they are discarded after the editor executes them...
    Object Model
    EditOperation ClassParcelEditToken ClassParcelEditToken ClassParcelEditToken ClassParcelEditToken ClassParcelEditToken ClassParcelEditToken ClassRowToken ClassEditOperation ClassParcelEditToken ClassParcelEditToken ClassParcelEditToken ClassParcelEditToken ClassParcelEditToken ClassParcelEditToken ClassParcelEditToken ClassParcelEditToken Class
    Syntax
    public sealed class EditOperation 
    Public NotInheritable Class EditOperation 
    Example
    Order edits sequentially
    // perform an edit and then a split as one operation.
    QueuedTask.Run(() =>
    {
      var queryFilter = new QueryFilter();
      queryFilter.WhereClause = "OBJECTID = " + oid.ToString();
    
      // create an edit operation and name.
      var op = new EditOperation();
      op.Name = "modify followed by split";
      // set the ExecuteMOde
      op.ExecuteMode = ExecuteModeType.Sequential;
    
      using (var rowCursor = fc.Search(queryFilter, false))
      {
        while (rowCursor.MoveNext())
        {
          using (var feature = rowCursor.Current as Feature)
          {
            op.Modify(feature, "NAME", newName);
          }
        }
      }
    
      op.Split(layer, oid, splitLine);
      if (!op.IsEmpty)
      {
        bool result = op.Execute();
      }
      // else
      //  The operation doesn't make any changes to the database so if executed it will fail
    });
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Editing.EditOperation

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also