COM - dpElementType()
Returns the appropriate element type for a data point element
Synopsis
HRESULT dpElementType([in] BSTR sDp, [out, retval]DpeType *iElementType);
Parameter
Parameter | Description |
---|---|
sDp | Data point element |
Description
Returns the element type as a constant. The constants from WinCC OA are defined in the COM manager in an own group (DpeType).
Note that an array is always returned. The first element (position 0) always contains an empty string. Thus, the use of the following interpretation is facilitated.
EXAMPLE
(See ComSample.xls, CComSample)
Public Sub dpElementType()
Dim asDpName() As String
Dim i As Integer
moComManager.dpNames "*.**", "ANALOG2", asDpName
For i = 1 To UBound(asDpName)
If moComManager.dpElementType(asDpName(i)) = DPE_BIT Then
Debug.Print asDpName(i)
End If
Next i
End Sub
Assignment
COM