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

In This Topic
    Split(Layer,Int64,IEnumerable<MapPoint>) Method
    In This Topic
    Splits a feature at multiple points.
    Syntax
    Public Overloads Sub Split( _
       ByVal layer As Layer, _
       ByVal oid As Long, _
       ByVal splitGeometries As IEnumerable(Of MapPoint) _
    ) 

    Parameters

    layer
    The layer of the feature to split.
    oid
    The oid of the feature to split.
    splitGeometries
    The list of points used to split the feature.
    Exceptions
    ExceptionDescription
    Layer and split geometries cannot be null.
    Only polyline layers can be split.
    Example
    Edit Operation Split Features
    var splitFeatures = new EditOperation() { Name = "Split Features" };
    
    var splitPoints = new List<MapPoint>() { mp1, mp2, mp3 };
    
    //Split the feature at 3 points
    splitFeatures.Split(featureLayer, oid, splitPoints);
    
    // split using percentage
    var splitByPercentage = new SplitByPercentage() { Percentage = 33, SplitFromStartPoint = true };
    splitFeatures.Split(featureLayer, oid, splitByPercentage);
    
    // split using equal parts
    var splitByEqualParts = new SplitByEqualParts() { NumParts = 3 };
    splitFeatures.Split(featureLayer, oid, splitByEqualParts);
    
    // split using single distance
    var splitByDistance = new SplitByDistance() { Distance = 27.3, SplitFromStartPoint = false };
    splitFeatures.Split(featureLayer, oid, splitByDistance);
    
    // split using varying distance
    var distances = new List<double>() { 12.5, 38.2, 89.99 };
    var splitByVaryingDistance = new SplitByVaryingDistance() { Distances = distances, SplitFromStartPoint = true, ProportionRemainder = true };
    splitFeatures.Split(featureLayer, oid, splitByVaryingDistance);
    
    //Execute to execute the operation
    //Must be called within QueuedTask.Run
    if (!splitFeatures.IsEmpty)
    {
      var result = splitFeatures.Execute(); //Execute and ExecuteAsync will return true if the operation was successful and false if not
    }
    
    //or use async flavor
    //await splitAtPointsFeatures.ExecuteAsync();
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also