ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Editing Namespace / EditOperation Class / Clip Method / Clip(Layer,Int64,Geometry,ClipMode) Method
The layer of the feature to be clipped.
The oid of the feature to be clipped.
The clipping geometry to clip the feature.
(Optional) Determines the clipping behavior. (default value = ClipMode.PreserveArea)
Example Version

Clip(Layer,Int64,Geometry,ClipMode) Method
Clip a feature with a geometry.
Syntax

Parameters

layer
The layer of the feature to be clipped.
oid
The oid of the feature to be clipped.
clippingGeometry
The clipping geometry to clip the feature.
clipMode
(Optional) Determines the clipping behavior. (default value = ClipMode.PreserveArea)
Remarks
Clip intersects a feature with a geometry. The resulting geometry is determined by the clipFeatureOptions.
Example
Edit Operation Clip Features
var clipFeatures = new EditOperation() { Name = "Clip Features" };
clipFeatures.Clip(featureLayer, oid, clipPoly, ClipMode.PreserveArea);
//Execute to execute the operation
//Must be called within QueuedTask.Run
if (!clipFeatures.IsEmpty)
{
  var result = clipFeatures.Execute(); //Execute and ExecuteAsync will return true if the operation was successful and false if not
}

//or use async flavor
//await clipFeatures.ExecuteAsync();
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also