ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Core.Geometry Namespace / MultipartBuilderEx Class / InsertPart Method / InsertPart(Int32,IEnumerable<Segment>) Method
The index before which the part will be inserted. Must be less than or equal to PartCount. Specify -1 or (PartCount) to to insert the part at the end of the Parts list.
An enumeration of segments.

In This Topic
    InsertPart(Int32,IEnumerable<Segment>) Method
    In This Topic
    Inserts a part constructed from the enumeration of segments to the MultipartBuilderEx. The part will be inserted into the Parts list.
    Syntax
    public void InsertPart( 
       int beforePartIndex,
       IEnumerable<Segment> segments
    )
    Public Overloads Sub InsertPart( _
       ByVal beforePartIndex As Integer, _
       ByVal segments As IEnumerable(Of Segment) _
    ) 

    Parameters

    beforePartIndex
    The index before which the part will be inserted. Must be less than or equal to PartCount. Specify -1 or (PartCount) to to insert the part at the end of the Parts list.
    segments
    An enumeration of segments.
    Exceptions
    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.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also