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


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

IConstructAngle.ConstructLine Method

Constructs the angle between the infinite line containing the input line segment and the positive x-axis.

[Visual Basic .NET]
Public Function ConstructLine ( _
    ByVal inLine As ILine _
) As Double
[C#]
public double ConstructLine (
    ILine inLine
);
[C++]
HRESULT ConstructLine(
  ILine* inLine
);
[C++]
Parameters
inLine 

inLine is a parameter of type ILine*

Product Availability

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

Description

ConstructLine returns the Angle defined by a given Line input.  This is the same Angle returned by the ILine::Angle method.  The Angle is displacement of the Line from a baseline through the From Point extending in the positive X direction.  The returned angle is the smaller angle with measure between -Pi and Pi.

Remarks

IConstructAngle ConstructLine Example
[Visual Basic .NET]

Private Shared Sub constructLine()

     Dim pPtFrom As IPoint

     Dim pPtTo As IPoint

     pPtFrom = New Point

     pPtTo = New Point

     Dim pLine As ILine

     pLine = New Line

     pPtFrom.PutCoords(0, 0)

     pPtTo.PutCoords(1, 1)

     pLine.PutCoords(pPtFrom, pPtTo)

     Dim pCAngle As IConstructAngle

     Dim pGEnv As GeometryEnvironment

     pGEnv = New GeometryEnvironment

     pCAngle = pGEnv

     Dim dAngle As Double

     dAngle = pCAngle.ConstructLine(pLine)

     MsgBox("The angle from the x-axis to the line is " & dAngle)

End Sub

See Also

IConstructAngle Interface | IConstructAngle.ConstructThreePoint Method | IConstructAngle.ConstructLine Method