SetAttribute Method

NI DataSocket

SetAttribute Method

Syntax

CWData.SetAttribute Name, Value

Purpose

Sets an attribute value.

Remarks

If the CWData object is owned by a CWDataSocket and the CWDataSocket is connected to a data target in a write access mode, setting an attribute triggers the CWDataSocket.Update method and sets the CWDataSocket.DataUpdated property to True.

Parameters

Name As Variant

Attribute to set.

Value As Variant

Value for the attribute.

Example

'Set the SampleRate attribute to 1000.
CWDataSocket1.Data.SetAttribute "SampleRate", 1000