FindMidLine Method

NI Vision for Visual Basic

FindMidLine Method

Syntax

CWIMAQVision.FindMidLine Line, Point, MidLine

Return Type

Long

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

Purpose

Computes the mid line between a point and a reference line. The mid line is the line that is parallel to the reference line and lies midway between the point and the reference line.

Parameters

Line As CWIMAQLine

Defines the reference line.

Point As CWIMAQPoint

Defines the point.

MidLine As CWIMAQLine

On return, the line that is parallel to the reference line and lies midway between the point and the reference line.

Example

Dim line As New CWIMAQLine
Dim point As New CWIMAQPoint
Dim midLine As New CWIMAQLine

' Initialize the line and the point
line.Initialize 10, 10, 100, 100
point.Initialize 50, -50

' Find the midline
CWIMAQVision1.FindMidLine line, point, midLine