CopyTo Method
Syntax
CWIMAQLine.CopyTo DestLine
Purpose
Copies all of the properties from the source line segment into the destination line segment.
Parameters
DestLine As CWIMAQLine
The destination line object.
Example
Private Sub Run_Click() Dim Line1 As New CWIMAQLine Dim Line2 As New CWIMAQLine 'Initialize the first line Line1.Initialize 30, 140, 140, 30 'Copy the properties from the first line into the second line. Line1.CopyTo Line2 'Move the first line. This move does not affect the second line. With Line1 .Start.X = .Start.X + 70 .Start.Y = .Start.Y + 70 .End.X = .End.X + 70 .End.Y = .End.Y + 70 End With 'Add the lines to the viewer's regions collection. CWIMAQViewer1.Regions.AddLine Line1 CWIMAQViewer1.Regions.AddLine Line2 End Sub