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


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

ISegmentCollection.RemoveSegments Method

Removes references to some segments. If closeGap is TRUE, then any remaining internal gap in the path, ring, polyline or polygon is connected with a single line segment.

[Visual Basic .NET]
Public Sub RemoveSegments ( _
    ByVal Index As Integer, _
    ByVal Count As Integer, _
    ByVal closeGap As Boolean _
)
[C#]
public void RemoveSegments (
    int Index,
    int Count,
    bool closeGap
);
[C++]
HRESULT RemoveSegments(
  long Index,
  long Count,
  VARIANT_BOOL closeGap
);
[C++]

Parameters Index
Index is a parameter of type long Count
Count is a parameter of type long closeGap
closeGap is a parameter of type bool

Product Availability

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

Description

Removes a specified number (Count) of Segments from a Segment Collection starting at a given index.
If the removal created a disjoint Path and if closeGap is TRUE, then the remaining segments will
be connected at the midpoint of the gap by modifying the segments adjacent to the gap.This will create a
connected Path.

See Also

ISegmentCollection Interface

.NET Snippets

Remove Segments From Geometry