CopyFrom Method
Syntax
CWData.CopyFrom Source
Purpose
Copies the value and attributes from another CWData object.
Remarks
If the destination CWData is owned by a CWDataSocket and the CWDataSocket is connected to the data target with the cwdsWriteAutoUpdate access mode, copying to the CWData object triggers the CWDataSocket.Update method. If the source CWData is owned by a CWDataSocket, copying from it sets the CWDataSocket.DataUpdated property to False.
Parameters
Source As CWData
CWData object from which to copy data.
Example
'Copy the current value and attributes from CWDataSocket.Data.
Dim CWData1 As New CWData
CWData1.CopyFrom CWDataSocket1.Data
'Make some changes to the copy.
CWData1.Value = 1
CWData1.SetAttribute "SampleRate", 10000
'Copy data back to DataSocket.Data.
CWDataSocket1.Data.CopyFrom CWData1