COM - dpTypes()

Returns all data point types that correspond to the pattern.

Synopsis

HRESULT dpTypes([in] BSTR sPattern, [out] SAFEARRAY(BSTR) *asDpType);

Parameters

Parameter Description
sPattern Pattern that is compared with the available data point types.
asDpType Array of data point types that correspond to the pattern.

Description

The method returns all data point types, which correspond to a pattern, from the project. An array is returned. The element 0 is empty. Therefore no error checking is necessary with a for statement from 1 to Ubound (ubound returns a value of type Long which contains the biggest available index for the specified dimension of a data field).

Note that an array is always returned. The first element always contains an empty string. Thus, the use of the following interpretation is facilitated.

EXAMPLE

(See ComSample.xls, CComSample)

Public Sub dpTypes()
Dim asDpType() As String
Dim i As Integer
moComManager.dpTypes "*", asDpType
For i = 0 To UBound(asDpType)
If Left(asDpType(i), 1) <> "_" Then
Debug.Print asDpType(i)
End If
Next i
End Sub

Assignment

COM