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 from the project that match the pattern and data point type. An array is returned. The element 0 is empty. Therefore, no error checking is necessary for a "for statement" from 1 to Ubound (ubound returns a value of type Long, which contains the largest available index for the specified dimension of a data field).

Note: Note that an array is always returned. The first element (position 0) always contains an empty string. This makes it easier to use the following interpretation.

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