ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Geometry Namespace / MultipartBuilderEx Class / AddSegments Method / AddSegments(Int32,IEnumerable<Segment>) Method
The index of the part to which the segments will be added. The segments are added to the end of the part.
An enumeration of segments.

In This Topic
    AddSegments(Int32,IEnumerable<Segment>) Method
    In This Topic
    Adds segments to the MultipartBuilderEx. The segments will be added to the end of the Parts list.
    Syntax
    public void AddSegments( 
       int partIndex,
       IEnumerable<Segment> segments
    )
    Public Overloads Sub AddSegments( _
       ByVal partIndex As Integer, _
       ByVal segments As IEnumerable(Of Segment) _
    ) 

    Parameters

    partIndex
    The index of the part to which the segments will be added. The segments are added to the end of the part.
    segments
    An enumeration of segments.
    Exceptions
    ExceptionDescription
    segments is null.
    partIndex is greater than PartCount - 1 or PartCount == 0 and part index is greater than 0.
    Remarks
    The spatial reference of each segment is ignored, and the attribute of each 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.If partIndex == 0 and PartCount == 0, then a new part is created. If partIndex is less than zero, then the segments are added to the last part.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also