ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Geometry Namespace / MultipartBuilderEx Class / ReplaceSegment Method
Zero-based index. Specify 0 to replace a segment from the first part. Specify PartCount - 1 or -1 to replace a segment from the last part.
Zero-based index. Specify 0 to replace the first segment. Specify GetSegmentCount - 1 or -1 to replace the last segment.
The new segment.

In This Topic
    ReplaceSegment Method
    In This Topic
    Replace the segment at the specified index from the part specified by partIndex.

    Note: Values of partIndex = -1, segmentIndex = -1 replaces the last segment from the last part of the multipart.

    Syntax
    public void ReplaceSegment( 
       int partIndex,
       int segmentIndex,
       Segment segment
    )
    Public Sub ReplaceSegment( _
       ByVal partIndex As Integer, _
       ByVal segmentIndex As Integer, _
       ByVal segment As Segment _
    ) 

    Parameters

    partIndex
    Zero-based index. Specify 0 to replace a segment from the first part. Specify PartCount - 1 or -1 to replace a segment from the last part.
    segmentIndex
    Zero-based index. Specify 0 to replace the first segment. Specify GetSegmentCount - 1 or -1 to replace the last segment.
    segment
    The new segment.
    Exceptions
    ExceptionDescription
    The input segment is null.
    The input part index is > PartCount - 1 or the input segment index is > GetSegmentCount - 1.
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also