GetDisplayInfoForSeveralItems

Returns arrays containing the labels and descriptions of dimension members. You can call GetDisplayInfoForSeveralItems for members in an application’s default dimension hierarchy or members in a member list. If you call this method for the default dimension hierarchy, an array of Booleans indicating whether the members have child members is also returned.

The arrays have a one-to-one correspondence. For example, the third elements in the returned arrays contain the label and description of the member identified by the third element in the varalItemIDs argument’s array.

Syntax

<IHsvTreeInfo>.GetDisplayInfoForSeveralItems lListID, varalItemIDs, varalParentIDs, pvaravbHasChildren, pvarabstrLabels, pvarabstrDescs

Argument

Description

lListID

Long (ByVal). Identifies either the default dimension hierarchy or a member list. Pass the HFMConstants type library constant MEMBER_LIST_ALL_HIERARCHY to return the members in the default hierarchy, or pass a valid list ID to return the members in a member list.

Tip:

You can get member list IDs with GetMemberListID. For more information, see GetMemberListID.

varalItemIDs

Variant array (ByVal). The member IDs of the dimension members for which you want to return information.

varalParentIDs

Variant array (ByVal). For hierarchical dimensions such as the Entity dimension, pass the member IDs of the parents of the varalItemIDs argument’s dimension members.

For non-hierarchical dimensions such as the Scenario dimension, pass an array in which each element is set to the HFMConstants type library constant MEMBERNOTUSED.

Caution!

This array must contain the same number of elements as the array passed to the varalItemIDs argument.

pvaravbHasChildren

Variant array. If you pass MEMBER_LIST_ALL_HIERARCHY to the lListID argument, each array element returns TRUE if the corresponding varalItemIDs array element has children, otherwise FALSE.

If you pass anything other than MEMBER_LIST_ALL_HIERARCHY to the lListID argument, each array element returns FALSE, regardless of whether the corresponding varalItemIDs array element has children.

The array is returned as a Boolean subtype.

pvarabstrLabels

Variant array. Returns the labels of the members. For hierarchical dimensions, the labels of the varalParentIDs array’s members are prefixed to the labels of the varalItemIDs array’s member, with periods delimiting the parent and child labels.

The array is returned as a String subtype.

pvarabstrDescs

Variant array. Returns the descriptions of the members. The descriptions are returned in the default language.

The array is returned as a String subtype.

Example

The following example prints the labels and descriptions of all of the Entity dimension’s members to the Immediate window. EnumAllParentAndChildIDs gets the member IDs of the dimension’s parent and child members, and these arrays are passed to GetDisplayInfoForSeveralItems.

Dim cTreeInfo As IHsvTreeInfo, vaParIDs, vaChildIDs
Dim vaHasKids, vaLabels, vaDescs
Set cTreeInfo = m_cMetadata.Entities
cTreeInfo.EnumAllParentAndChildIDs vaParIDs, vaChildIDs
cTreeInfo.GetDisplayInfoForSeveralItems _ 
MEMBER_LIST_ALL_HIERARCHY, vaChildIDs, vaParIDs, _ 
vaHasKids, vaLabels, vaDescs
For i = LBound(vaChildIDs) To UBound(vaChildIDs)
  Debug.Print vaLabels(i) & "  " & vaDescs(i)
Next i