This document is archived and information here might be outdated.  Recommended version.


ISegmentCollection.AddSegment Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Geometry)  

ISegmentCollection.AddSegment Method

Adds a reference to the input segment at the end, or before or after a specified index.

[Visual Basic .NET]
Public Sub AddSegment ( _
    ByVal inSegment As ISegment, _
    [ByRef before As Object], _
    [ByRef after As Object] _
)
[C#]
public void AddSegment (
    ISegment inSegment,
    ref object before,
    ref object after
);
[C++]
HRESULT AddSegment(
  ISegment* inSegment,
  Variant* before,
  Variant* after
);
[C++]

Parameters inSegment
inSegment is a parameter of type ISegment* before [optional]
before is a parameter of type VARIANT* after [optional]
after is a parameter of type VARIANT*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Adds a Segment to a Segment Collection.  If before and after are omitted, the Segment is added to the end of the Segment Collection.  Additionally, by specifying either the before or after index, the Segment can be added at a specific location in the Segment Collection.

See Also

ISegmentCollection Interface

.NET Samples

Curve conversion add-in (Code Files: CurveConversionDockWin)

.NET Related Topics

Calling the Simplify method | Creating custom symbols | How to create a multipart polyline | How to use the IEnumSegment methods | How to use the IEnumVertex methods | How to work with IEllipticArc properties