COM - dpSet()
Assigns values to data point attributes.
Synopsis
HRESULT dpSet([in] VARIANT vDpName, [in] VARIANT vValue);
Parameter
Parameter | Description |
---|---|
vDpName | Data point attributes |
vValue | Values that are written |
Description
Sets the value of the data point attribute that is specified in the vDpName string. The value to be set is defined in the vValue variable. The type of vValue depends on the type of attribute. If an attribute does not exist, a runtime error is displayed. If only the data point is specified, :_original.._value is added. See also CTRL function dpSet().
Example
(See ComSample.xls, CComSample)
Public Sub dpSet()
Dim asDp(1) As String
Dim avValue(1) As Variant
'Setzen eines einzelnen Wertes
moComManager.dpSet "ExampleDP_Arg1.:_original.._value", 42
'Setzen mehrerer Werte
asDp(0) = "ExampleDP_Arg1.:_original.._value"
avValue(0) = 10
asDp(1) = "ExampleDP_Arg2."
avValue(1) = 20
moComManager.dpSet asDp, avValue
End Sub