Returns the member IDs of the members with labels that match a search string.
<IHsvTreeInfo>.FindMatchingMembersFromHierarchy bstrSearchText, lTopMemberID, varbExactMatch, pvaravaralPaths
The following subroutine prints to Visual Basic’s Immediate window the labels of all members of a given dimension with labels that partially match the specified string.
Sub printPartMatchingLabels(iDim As Integer, sSearch As String) Dim cTreeInfo As IHsvTreeInfo, vaMems, sLabel As String 'Set the IHsvTreeInfo interface to the specified dimension. 'g_cMetadata is an HsvMetadata object reference. Set cTreeInfo = g_cMetadata.Dimension(iDim) cTreeInfo.FindMatchingMembersFromHierarchy sSearch, TREE_ROOT, False, _ vaMems 'Loop through the array of arrays For i = LBound(vaMems) To UBound(vaMems) 'Loop through the items in each array For j = LBound(vaMems(i)) To UBound(vaMems(i)) cTreeInfo.GetLabel vaMems(i)(j), sLabel Debug.Print sLabel Next j Debug.Print vbCrLf Next i End Sub