COM - dpGet()

Reads values of data point attributes and saves the values in variables.

Synopsis

HRESULT dpGet([in] VARIANT vDpName, [out] VARIANT *vValue);

Parameter

Parameter Description
vDpName Data point attributes to be read.
vValue Variables the values are saved in.

Description

The function dpGet gets one or several strings with data point attributes in the parameter vDpName and returns the result in the parameter vValue. The type of the vValue depends on the attribute type. If a data point does not exist, an error code is returned in the vValue.

If only the data point is specified, :_online.._value is added. See also CTRL function dpGet().

EXAMPLE

(See ComSample.xls, CComSample)

Public Sub dpGet()
Dim asDp(2) As String
Dim vValue As Variant
Dim i As Integer
'Abfrage eines einzelnen Wertes
moComManager.dpGet "ExampleDP_Arg1.:_online.._value", vValue
Debug.Print "ExampleDP_Arg1.:_online.._value", vValue
'Abfrage mehrerer Werte
asDp(0) = "ExampleDP_Arg2.:_online.._value"
asDp(1) = "ExampleDP_Result."
asDp(2) = "dp.dpe:conf.det.attr"
moComManager.dpGet asDp, vValue
For i = 0 To 2
Debug.Print asDp(i), vValue(i)
Next i
End Sub

Assignment

COM