FindAngleBetweenLines Method

NI Vision for Visual Basic

FindAngleBetweenLines Method

Syntax

CWIMAQVision.FindAngleBetweenLines Line1, Line2, Angle

Return Type

Long

On success, this method returns 0. On failure, this method returns a negative number.

Purpose

Computes the angle between two lines.

Parameters

Line1 As CWIMAQLine

Defines the first line.

Line2 As CWIMAQLine

Defines the second line.

Angle As Double

On return, the angle, in degrees, between the two lines.

Example

Dim line1 As New CWIMAQLine
Dim line2 As New CWIMAQLine
Dim angle As Double

' Initialize the lines
line1.Initialize 10, 10, 100, 100
line2.Initialize -40, -100, 20, 30

' Find the angle between lines
CWIMAQVision1.FindAngleBetweenLines line1, line2, angle