FindPointDistances Method

NI Vision for Visual Basic

FindPointDistances Method

Syntax

CWIMAQVision.FindPointDistances Points, Distances

Return Type

Long

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

Purpose

Computes the distance, in pixels, between consecutive pairs of points.

Parameters

Points As CWIMAQPoints

Specifies the points the method uses to find the distances.

Distances As Variant

On return, an array containing the computed distances. The method computes distance i between points i + 1 and i + 2.

Example

Dim points As New CWIMAQPoints
Dim distances

' Initialize points
points.Initialize Array(10, 100, 50), Array(20, 30, 40)

' Find the distances between consecutive points
CWIMAQVision1.FindPointDistances points, distances

Gauging Example