Splits a polyline or polygon into multiple parts from the provided split geometry location with a system-assigned object ID.
Parameters
- splitGeometry
- Location to split a polyline or polygon feature
Return Value
The ObjectIDs of newly created features from the split operation.
Split a feature by geometry
{
// Must be called within QueuedTask.Run
void SplitALineByPoint(FeatureClass lineFeatureClass, MapPoint xPoint)
{
using (RowCursor rowCursor =
lineFeatureClass.Search(new QueryFilter() { ObjectIDs = new List<long>() { 1 } }))
{
if (rowCursor.MoveNext())
{
using (Feature feature = rowCursor.Current as Feature)
{
// ObjectIDs of newly created lines
IReadOnlyList<long> splits = feature.Split(xPoint);
}
}
}
}
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)
ArcGIS Pro version: 3.4 or higher.