ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Editing Namespace / EditOperation Class / Split Method / Split(SelectionSet,Geometry) Method
The set of features to be split.
The geometry used to define the intersection.
Example

In This Topic
    Split(SelectionSet,Geometry) Method
    In This Topic
    Splits the lines and polygons in the features with the splitGeometry.
    Syntax
    Public Overloads Sub Split( _
       ByVal features As SelectionSet, _
       ByVal splitGeometry As Geometry _
    ) 

    Parameters

    features
    The set of features to be split.
    splitGeometry
    The geometry used to define the intersection.
    Remarks
    The feature(s) will be split wherever the input geometry intersect. Examples are split a line(s) by a point(s); split a line(s) by line(s), split a polygon(s) by line(s), split a polygon(s) by polygon(s).
    Example
    Edit Operation Split Features
    // Splits the specified feature at the given points.
    await QueuedTask.Run(() =>
      {
        //Split features at given points
        //Split features using EditOperation.Split overloads
        var splitFeatures = new EditOperation() { Name = "Split Features" };
    
        //Split the feature at given points
        splitFeatures.Split(featureLayer, objectId, splitPoints);
    
        //Execute to execute the operation
        //Must be called within QueuedTask.Run
        if (!splitFeatures.IsEmpty)
        {
          //Execute and ExecuteAsync will return true if the operation was successful and false if not
          var result = splitFeatures.Execute();
          //or use async flavor
          //await splitAtPointsFeatures.ExecuteAsync();
        }
      });
    // Splits a feature in the specified feature layer based on a given percentage and object ID.
    await QueuedTask.Run(() =>
    {
      var percentage = 25.0;
    
      //Split features using EditOperation.Split overloads
      var splitFeatures = new EditOperation() { Name = "Split Features" };
    
      // split using percentage
      var splitByPercentage = new SplitByPercentage() { Percentage = percentage, SplitFromStartPoint = true };
      splitFeatures.Split(featureLayer, objectId, splitByPercentage);
    
      //Execute to execute the operation
      //Must be called within QueuedTask.Run
      if (!splitFeatures.IsEmpty)
      {
        //Execute and ExecuteAsync will return true if the operation was successful and false if not
        var result = splitFeatures.Execute();
        //or use async flavor
        //await splitAtPointsFeatures.ExecuteAsync();
      }
    });
    // Splits a feature in the specified feature layer into the specified number of parts.
    await QueuedTask.Run(() =>
      {
        var numParts = 3;
        // split using equal parts
        //Split features using EditOperation.Split overloads
        var splitFeatures = new EditOperation() { Name = "Split Features" };
        var splitByEqualParts = new SplitByEqualParts() { NumParts = numParts };
        splitFeatures.Split(featureLayer, objectId, splitByEqualParts);
    
        //Execute to execute the operation
        //Must be called within QueuedTask.Run
        if (!splitFeatures.IsEmpty)
        {
          //Execute and ExecuteAsync will return true if the operation was successful and false if not
          var result = splitFeatures.Execute();
          //or use async flavor
          //await splitAtPointsFeatures.ExecuteAsync();
        }
      });
    // Splits a feature in the specified feature layer at a given distance and object ID.
    await QueuedTask.Run(() =>
      {
        var distance = 150.0;
    
        //Split features using EditOperation.Split overloads
        var splitFeatures = new EditOperation() { Name = "Split Features" };
    
        // split using single distance
        var splitByDistance = new SplitByDistance() { Distance = distance, SplitFromStartPoint = false };
        splitFeatures.Split(featureLayer, objectId, splitByDistance);
    
        //Execute to execute the operation
        //Must be called within QueuedTask.Run
        if (!splitFeatures.IsEmpty)
        {
          //Execute and ExecuteAsync will return true if the operation was successful and false if not
          var result = splitFeatures.Execute();
          //or use async flavor
          //await splitAtPointsFeatures.ExecuteAsync();
        }
    
      });
    // Splits a feature in the specified feature layer at a given distance and object ID.
    await QueuedTask.Run(() =>
     {
       var distances = new List<double> { 100.0, 200.0, 50.0 };
       //Split features using EditOperation.Split overloads
       var splitFeatures = new EditOperation() { Name = "Split Features" };
    
       // split using varying distance
       var splitByVaryingDistance = new SplitByVaryingDistance() { Distances = distances, SplitFromStartPoint = true, ProportionRemainder = true };
       splitFeatures.Split(featureLayer, objectId, splitByVaryingDistance);
    
       //Execute to execute the operation
       //Must be called within QueuedTask.Run
       if (!splitFeatures.IsEmpty)
       {
         //Execute and ExecuteAsync will return true if the operation was successful and false if not
         var result = splitFeatures.Execute();
         //or use async flavor
         //await splitAtPointsFeatures.ExecuteAsync();
       }
     });
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also