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 of WinCC OA are defined in a separate group (DpeType) in the COM Manager.

Note: Note that an array is always returned. The first element (position 0) always contains an empty string. This facilitates the following interpretation.

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