ArcGIS Pro 2.7 API Reference Guide
InsertSegment(Int32,Int32,Segment) Method

ArcGIS.Core.Geometry Namespace > MultipartBuilder<T> Class > InsertSegment Method : InsertSegment(Int32,Int32,Segment) Method
0 based index for parts. 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 segment to insert.
Insert a segment 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,
   Segment segment
)
Public Overloads Overridable Sub InsertSegment( _
   ByVal partIndex As Integer, _
   ByVal beforeSegmentIndex As Integer, _
   ByVal segment As Segment _
) 

Parameters

partIndex
0 based index for parts. 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.
segment
The segment to insert.
Exceptions
ExceptionDescription
Incompatible spatial references.
This method or property must be called within the lambda passed to QueuedTask.Run.
segment 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