ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Editing Namespace / EditOperation Class / Split Method / Split(Layer,IEnumerable<Int64>,IEnumerable<MapPoint>) Method
The layer of the features to split.
The oids of the features to split.
The list of points used to split each feature.
Example

In This Topic
    Split(Layer,IEnumerable<Int64>,IEnumerable<MapPoint>) Method
    In This Topic
    Split a number of features at multiple points
    Syntax

    Parameters

    layer
    The layer of the features to split.
    oids
    The oids of the features to split.
    splitGeometries
    The list of points used to split each feature.
    Exceptions
    ExceptionDescription
    Layer and split geometries cannot be null.
    Only polyline layers can be split.
    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