CopyTo Method

NI Vision for Visual Basic

CopyTo Method

Syntax

CWIMAQOverlay.CopyTo DestOverlay

Purpose

Copies all data from one CWIMAQOverlay object to another. This overlay is added to the existing overlay information on the destination image.

Parameters

DestOverlay As CWIMAQOverlay

The destination overlay object.

Example

Private Sub Run_Click()
    'Overlay a rectangle so we have something to copy
    Dim Rectangle As New CWIMAQRectangle
    Rectangle.Initialize 39, 45, 180, 89
    CWIMAQViewer1.Image.Overlays(1).DrawRectangle Rectangle, cwimaqOverlayModeHighlight
    
    'Copy the overlay from viewer1 to viewer2
    CWIMAQViewer1.Image.Overlays(1).CopyTo CWIMAQViewer2.Image.Overlays(1)
End Sub