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

ICurve3D.QueryPoint3D Method (ArcObjects .NET 10.8 SDK)
 ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IC > ICurve3D Interface > ICurve3D.QueryPoint3D Method
 ArcGIS Developer Help

# ICurve3D.QueryPoint3D Method

Copies to outPoint the properties of a point on the curve at a specified distance from the beginning of the curve.

```[Visual Basic .NET]
Public Sub QueryPoint3D ( _
ByVal extension As esriSegmentExtension, _
ByVal DistanceAlongCurve As Double, _
ByVal bAsRatio As Boolean, _
ByVal pOutPoint As IPoint _
)
```
```[C#]
public void QueryPoint3D (
esriSegmentExtension extension,
double DistanceAlongCurve,
bool bAsRatio,
IPoint pOutPoint
);
```
```[C++]
HRESULT QueryPoint3D(
esriSegmentExtension extension,
double DistanceAlongCurve,
VARIANT_BOOL bAsRatio,
IPoint* pOutPoint
);
```
```[C++]
Parameters
extension
extension is a parameter of type esriSegmentExtension
DistanceAlongCurve
DistanceAlongCurve is a parameter of type double
bAsRatio
bAsRatio is a parameter of type bool
pOutPoint
pOutPoint is a parameter of type IPoint*
```

#### Product Availability

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

#### Description

Returns the Point at a given 3D distance along the curve or extended curve.  If the distance is less than the length of the curve, then the returned point is the point at that distance along the curve.  If the distance is less than zero, or greater than the length of the curve, then the returned point is on the curve specified by the extension method.  The distance may be specified as a fixed unit of measure or a ratio of the 3D length of the curve.

[C#]

public static void QueryPoint3D()

{

const double DistanceAlongCurve = 0.707;

IGeometry polylineGeometry = GetPolylineGeometry();

IPolyline polyline = polylineGeometry as IPolyline;

IPoint firstPoint = polyline.FromPoint;

ICurve3D curve3D = polylineGeometry as ICurve3D;

IPoint outPoint = new PointClass();

curve3D.QueryPoint3D(

esriSegmentExtension.esriNoExtension, DistanceAlongCurve, true, outPoint
);

//outPoint = (-4.685, -4.437, -5.804)

}