ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Editing Namespace / EditOperation Class / Explode Method / Explode(Layer,Int64,Boolean) Method
The layer of the feature to explode.
The oid of the feature to explode.
Option to delete or keep original feature after explode operation.
Example

In This Topic
    Explode(Layer,Int64,Boolean) Method
    In This Topic
    Explode a feature.
    Syntax
    Public Overloads Sub Explode( _
       ByVal layer As Layer, _
       ByVal oid As Long, _
       Optional ByVal keepOriginalFeature As Boolean _
    ) 
    public void Explode( 
       Layer layer,
       long oid,
       bool keepOriginalFeature
    )

    Parameters

    layer
    The layer of the feature to explode.
    oid
    The oid of the feature to explode.
    keepOriginalFeature
    Option to delete or keep original feature after explode operation.
    Exceptions
    ExceptionDescription
    Layer and ObjectIDs cannot be null. List of ObjectIDs cannot be empty.
    Example
    Edit Operation Explode Features
    // Explodes a multi-part feature into individual features.
    await QueuedTask.Run(() =>
      {
        var explodeFeatures = new EditOperation() { Name = "Explode Features" };
    
        //Take a multipart and convert it into one feature per part
        //Provide a list of ids to convert multiple
        explodeFeatures.Explode(featureLayer, [objectId], true);
    
        //Execute to execute the operation
        //Must be called within QueuedTask.Run
        if (!explodeFeatures.IsEmpty)
        {
          //Execute and ExecuteAsync will return true if the operation was successful and false if not
          var result = explodeFeatures.Execute();
          //or use async flavor
          //await explodeFeatures.ExecuteAsync();
        }
      });
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also