ArcGIS Pro 2.9 API Reference Guide
InsertSegment(Int32,Int32,SegmentBuilderEx) Method

ArcGIS.Core.Geometry Namespace > MultipartBuilderEx Class > InsertSegment Method : InsertSegment(Int32,Int32,SegmentBuilderEx) Method
The index of the part into which the segment will inserted. Must be less than PartCount. Specify -1 or (PartCount - 1) to remove the last part.
The index before which the segment will be inserted. Must be less than or equal to SegmentCount(partIndex). The segment builder from which the segment to insert will be built. part at the end of the Parts list.
The segment builder from which the segment to insert will be built.
Inserts a segment into an existing part using a segment builder.
Syntax
Public Overloads Sub InsertSegment( _
   ByVal partIndex As Integer, _
   ByVal beforeSegmentIndex As Integer, _
   ByVal segmentBuilder As SegmentBuilderEx _
) 

Parameters

partIndex
The index of the part into which the segment will inserted. Must be less than PartCount. Specify -1 or (PartCount - 1) to remove the last part.
beforeSegmentIndex
The index before which the segment will be inserted. Must be less than or equal to SegmentCount(partIndex). The segment builder from which the segment to insert will be built. part at the end of the Parts list.
segmentBuilder
The segment builder from which the segment to insert will be built.
Exceptions
ExceptionDescription
segmentBuilder is null.
partIndex is greater than PartCount - 1 or beforeSegmentIndex is greater than SegmentCount(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, Windows 8.1

See Also

Reference

MultipartBuilderEx Class
MultipartBuilderEx Members
Overload List