ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Editing Namespace / EditOperation Class / Split Method / Split(Layer,Int64,Geometry) Method
The layer of the feature to split.
The oid of the feature to split.
The geometry to intersect the source feature.
Example

In This Topic
    Split(Layer,Int64,Geometry) Method
    In This Topic
    Split a feature where the splitGeometry intersects it.
    Syntax
    public void Split( 
       Layer layer,
       long oid,
       Geometry splitGeometry
    )
    Public Overloads Sub Split( _
       ByVal layer As Layer, _
       ByVal oid As Long, _
       ByVal splitGeometry As Geometry _
    ) 

    Parameters

    layer
    The layer of the feature to split.
    oid
    The oid of the feature to split.
    splitGeometry
    The geometry to intersect the source feature.
    Exceptions
    ExceptionDescription
    Layer cannot be null.
    Example
    Edit Operation Cut Features
    var select = MapView.Active.SelectFeatures(clipPoly);
    
    var cutFeatures = new EditOperation() { Name = "Cut Features" };
    cutFeatures.Split(featureLayer, oid, cutLine);
    
    //Cut all the selected features in the active view
    //Select using a polygon (for example)
    //at 2.x - var kvps = MapView.Active.SelectFeatures(polygon).Select(
    //      k => new KeyValuePair<MapMember, List<long>>(k.Key as MapMember, k.Value));
    //cutFeatures.Split(kvps, cutLine);
    var sset = MapView.Active.SelectFeatures(polygon);
    cutFeatures.Split(sset, cutLine);
    
    //Execute to execute the operation
    //Must be called within QueuedTask.Run
    if (!cutFeatures.IsEmpty)
    {
      var result = cutFeatures.Execute(); //Execute and ExecuteAsync will return true if the operation was successful and false if not
    }
    
    //or use async flavor
    //await cutFeatures.ExecuteAsync();
    
    Order edits sequentially
    // perform an edit and then a split as one operation.
    QueuedTask.Run(() =>
    {
      var queryFilter = new QueryFilter() { WhereClause = "OBJECTID = " + oid.ToString() };
    
      // create an edit operation and name.
      var op = new EditOperation() { 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
    });
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also