COM - dpNames()

Returns all data points corresponding to the specified type and pattern.

Synopsis

HRESULT dpNames([in] BSTR sDpPattern, [in] BSTR sDpType, [out] SAFEARRAY(BSTR) *asDpName);

Parameters

Parameter Description
sDpPattern Pattern that is compared to the existing data points.
sDpType Data point type
asDpName Array of data points corresponding to the type and pattern.

Description

This method returns all data points, which correspond to the pattern and data point type, 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 (position 0) always contains an empty string. Thus, the use of the following interpretation is facilitated.

EXAMPLE

(See ComSample.xls, CComSample)

Public Sub dpNames()
Dim asDpName() As String
Dim i As Integer
moComManager.dpNames "_mp_*", "*", asDpName
For i = 0 To UBound(asDpName)
Debug.Print asDpName(i)
Next i
End Sub

Assignment

COM