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


IRing.Close Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IR > IRing Interface > IRing.Close Method
ArcGIS Developer Help

IRing.Close Method

Makes sure that this ring is closed by adding a line segment between the ring's 'to' and 'from' points if necessary.

[Visual Basic .NET]
Public Sub Close ( _
)
[C#]
public void Close (
);
[C++]
HRESULT Close(
void
);

Product Availability

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

Description

Checks whether or not the From and To Points of the Path occur at the same Point.  If the From and To Point have the same X and Y coordinates, the Ring is considered closed, and no action is taken.  However, if the From and To Points are not at the same X and Y coordinates, a Line segment is added at the end of the Ring between the To Point and the From Point.  This Line segment completes the Ring making it closed.

Remarks

This method should generally not be called in a 3D context, due to the fact that Close() only compares X and Y and not Z vertex values. Instead, the first point in the point collection should be manually re-added as the last point in the point collection to close the geometry.

See Also

IRing Interface

.NET Samples

3D multipatch examples 3D multipatch examples 3D multipatch examples