ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Core.Geometry Namespace / MultipartBuilderEx Class / InsertSegments Method
The index of the part into which the segments will inserted. Must be less than PartCount. Specify -1 or (PartCount - 1) to remove the last part.
The index before which the segments will be inserted. Must be less than or equal to GetSegmentCount(partIndex). Specify -1 or GetSegmentCount(partIndex) to insert at the end of the part.
The segments to insert.

In This Topic
    InsertSegments Method
    In This Topic
    Inserts a range of segments into an existing part.
    Syntax
    Public Sub InsertSegments( _
       ByVal partIndex As Integer, _
       ByVal beforeSegmentIndex As Integer, _
       ByVal segments As IEnumerable(Of Segment) _
    ) 

    Parameters

    partIndex
    The index of the part into which the segments will inserted. Must be less than PartCount. Specify -1 or (PartCount - 1) to remove the last part.
    beforeSegmentIndex
    The index before which the segments will be inserted. Must be less than or equal to GetSegmentCount(partIndex). Specify -1 or GetSegmentCount(partIndex) to insert at the end of the part.
    segments
    The segments to insert.
    Exceptions
    ExceptionDescription
    segments is null.
    partIndex is greater than PartCount - 1 or beforeSegmentIndex is greater than GetSegmentCount(partIndex).
    Remarks
    The spatial reference of the segment is ignored, and the attribute of the segment does not affect the attribute awareness of the builder. However, if the builder has an attribute and the start or end point of a segment also has that attribute, then the attribute value will be taken from the point. If the point doesn't have that attribute, then a default value will be set in the builder. For example, suppose the HasZ property of the builder is set to true. If the HasZ property of a point is set to true, then the point's Z-value is used. Otherwise, the default value is used. The default value for Z is 0, for M is NaN and for ID is 0.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also