CopyTo Method

NI Vision for Visual Basic

CopyTo Method

Syntax

CWIMAQPoints.CopyTo DestPoints

Purpose

Copies all of the points from one points collection into another.

Parameters

DestPoints As CWIMAQPoints

The points collection to copy into.

Example

Private Sub Run_Click()
    Dim SourcePoints As New CWIMAQPoints
    Dim DestPoints As New CWIMAQPoints
    
    'Initialize the SourcePoints collection with data
    SourcePoints.Initialize Array(50, 100, 100, 50, 50), Array(50, 50, 100, 100, 50)
    
    'Fill the destination points collection with data. This data will be
    'overwritten by the CopyTo below.
    DestPoints.Initialize 200, 200
    
    'Copy SourcePoints into DestPoints
    SourcePoints.CopyTo DestPoints
    
    'Overlay the points in DestPoints
    CWIMAQViewer1.Image.Overlays(1).DrawConnectedPoints DestPoints, cwimaqOverlayModeFrame
End Sub

See Also

Initialize