ArcObjects Library Reference (Geometry)  

IEnumCurve2.QuerySubcurve Method

Copies a portion of this curve into an existing subcurve. AsRatio is true when fromDistance and toDistance are normalized to the interval [0..1].

[Visual Basic .NET]
Public Sub QuerySubcurve ( _
    ByVal fromDistance As Double, _
    ByVal toDistance As Double, _
    ByVal asRatio As Boolean, _
    ByVal subcurve As ICurve _
)
[C#]
public void QuerySubcurve (
    double fromDistance,
    double toDistance,
    bool asRatio,
    ICurve subcurve
);
[C++]
HRESULT QuerySubcurve(
  double fromDistance,
  double toDistance,
  VARIANT_BOOL asRatio,
  ICurve* subcurve
);
[C++]

Parameters

fromDistance   fromDistance is a parameter of type double toDistance   toDistance is a parameter of type double asRatio   asRatio is a parameter of type VARIANT_BOOL subcurve

  subcurve is a parameter of type ICurve

Product Availability

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

Description

The QuerySubCurve method returns a polyline object corresponding to a portion of the input curve.

Remarks

Note: Gaps between parts are ignored in distance computations.

Parameters description:

fromDistance: Input Double. Input distance that determines where the subcurve should start. The value of that parameter should be in map unit unless asRatio is true.
toDistance: Input Double. Input distance that determines where the subcurve should stop. The value of that parameter should be in map unit unless asRatio is true.
asRatio: Input Boolean. The asRatio determines if the input distances should be interpreted as map unit asRatio = false distance or parametric distance asRatio = True (0 = distance of 0, 1 = full length of the curve).

subcurve: Output polyline object. It contains the output subcurve.

Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

See Also

IEnumCurve2 Interface