ArcGIS Pro 2.7 API Reference Guide
RemoveSegment Method

ArcGIS.Core.Geometry Namespace > MultipartBuilder<T> Class : RemoveSegment Method
0 based index. Specify 0 to remove a segment from the first part. Specify (CountParts - 1) or -1 to remove a segment from the last part.
0 based index. Specify 0 to remove the first segment. Specify (CountSegments - 1) or -1 to remove the last segment.
Set to true to create a connected part after the remove.
Remove the segment at the specified index from the part specified by partIndex. There is no return value. This method must be called on the MCT. Use QueuedTask.Run.

Note: a value of partIndex=-1, segmentIndex=-1 removes the last segment from the last part of the multipart. All other combinations should be self-explanatory.

Syntax
public virtual void RemoveSegment( 
   int partIndex,
   int segmentIndex,
   bool closeGap
)
Public Overridable Sub RemoveSegment( _
   ByVal partIndex As Integer, _
   ByVal segmentIndex As Integer, _
   ByVal closeGap As Boolean _
) 

Parameters

partIndex
0 based index. Specify 0 to remove a segment from the first part. Specify (CountParts - 1) or -1 to remove a segment from the last part.
segmentIndex
0 based index. Specify 0 to remove the first segment. Specify (CountSegments - 1) or -1 to remove the last segment.
closeGap
Set to true to create a connected part after the remove.
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Remarks
If the removal creates a disjoint part and if closeGap is TRUE, then the remaining segments will be connected at the midpoint of the gap by modifying the segments adjacent to the gap.This will create a connected part.
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

MultipartBuilder<T> Class
MultipartBuilder<T> Members