Computes properties of Geoline object using the FromPoint and ToPoint.
ERROR: Syntax information about IMeasurementTool.ConstructByPoints may not be in D:\ArcGIS\DotNet\ESRI.ArcGIS.DefenseSolutions.dll
[C++]
HRESULT ConstructByPoints(
IPoint* piFromPoint,
IPoint* piToPoint
);
[C++]Parameters
piFromPoint [in]piFromPoint is a parameter of type IPoint
piToPoint [in]piToPoint is a parameter of type IPoint
Product Availability
Available with ArcGIS Engine and ArcGIS Desktop.
Remarks
The following VB snippet illustrates how to use the ConstructByPoints method to return the distance and azimuth of a Geoline.
Dim pStart As IPoint
Dim pEnd As IPoint
Dim dDist As Double
Dim dAzi As Double
Dim pMeasureTool As IMeasurementTool
Set pStart = New Point 'the points here are assumed to have coordinates and a spatial reference
Set pEnd = New Point
Set pMeasureTool = New MeasurementTool
Set pMeasureTool.SpecialSpatialReference = pSpatRef
pMeasureTool.ConstructByPoints pStart, pEnd
pMeasureTool.SpecialGeolineType = cjmtkSGTGreatCircle
dDist = pMeasureTool.Distance 'the distance of the line in meters
dAzi = pMeasureTool.Angle 'the azimuth of the line in degrees clockwise from north