ArcGIS Pro 2.8 API Reference Guide
InsertSegment(Int32,Int32,SegmentBuilder) Method

ArcGIS.Core.Geometry Namespace > MultipartBuilder<T> Class > InsertSegment Method : InsertSegment(Int32,Int32,SegmentBuilder) Method
0 based index for the part. Specify 0 to insert at the beginning. Specify (CountParts - 1) or -1 to insert at the end.
0 based index for the segment. Specify 0 to insert at the beginning and -1 to insert at the end.
The segmentBuilder containing the segments.
Insert a segment constructed from a SegmentBuilder to the part specified by partIndex before the segment specified by the beforeSegmentIndex. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public virtual void InsertSegment( 
   int partIndex,
   int beforeSegmentIndex,
   SegmentBuilder segmentBuilder
)
Public Overloads Overridable Sub InsertSegment( _
   ByVal partIndex As Integer, _
   ByVal beforeSegmentIndex As Integer, _
   ByVal segmentBuilder As SegmentBuilder _
) 

Parameters

partIndex
0 based index for the part. Specify 0 to insert at the beginning. Specify (CountParts - 1) or -1 to insert at the end.
beforeSegmentIndex
0 based index for the segment. Specify 0 to insert at the beginning and -1 to insert at the end.
segmentBuilder
The segmentBuilder containing the segments.
Exceptions
ExceptionDescription
Incompatible spatial references.
This method or property must be called within the lambda passed to QueuedTask.Run.
segmentBuilder is null.
Remarks
Specifying -1 for the partIndex is equivalent to Add.
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

MultipartBuilder<T> Class
MultipartBuilder<T> Members
Overload List