Selects or clears check boxes for the specified dimension members when the tab is configured for multi-select mode.
To return the member IDs of members for which check boxes are selected, use GetCheckedItems. |
<HsvPOVSelection>.SetCheckedItems lDim, varalItemIDs, varalParentIDs, bCheck, bClearAllExistingCheckedItems
Long (ByVal). The ID of the dimension. Dimension IDs are represented by the HFMConstants type library constants listed in Dimension ID Constants. | |
Long array (ByVal). The member IDs of the members for which check boxes are being selected or cleared. | |
Variant (ByVal). The member IDs for the parents of the varalItemIDs argument’s entities, if the lDim argument specifies the Entity dimension. For the Entity dimension, you must pass a Long array of parent member IDs. The array should have a one-to-one correspondence with the varalItemIDs argument’s array. If an Entity member does not have a parent, pass the HFMConstants type library constant MEMBERNOTUSED, which is described in Dimension Member Constants. If the lDim argument specifies a dimension other than Entity, this argument is ignored. However, you must pass a value such as an empty Variant or a Long array. | |
Boolean (ByVal). A flag that specifies whether to select or clear check boxes for the specified members. Pass TRUE to select the check boxes, FALSE to clear them. | |
Boolean (ByVal). A flag that specifies whether to clear check boxes that had been selected before the call to SetCheckedItems. Pass TRUE to clear previously selected check boxes, FALSE otherwise. |
The following subroutine uses member labels to select check boxes for specified members. IHsvTreeInfo.GetItemID gets the member IDs of the labels passed to the subroutine, and these IDs are passed to SetCheckedItems.
Sub selectMembers(lDim As Long, vaMems, vaPars) Dim cTreeInfo As IHsvTreeInfo, laIds() As Long Dim laParIds() As Long 'g_cMetadata is a previously set HsvMetadata instance Set cTreeInfo = g_cMetadata.Dimension(lDim) ReDim laIds(UBound(vaMems)) For i = LBound(vaMems) To UBound(vaMems) laIds(i) = cTreeInfo.GetItemID(CStr(vaMems(i))) Next If lDim = DIMENSIONENTITY Then ReDim laParIds(UBound(vaPars)) For i = LBound(vaPars) To UBound(vaPars) If Len(vaPars(i)) > 0 Then laParIds(i) = cTreeInfo.GetItemID(vaPars(i)) Else laParIds(i) = MEMBERNOTUSED End If Next End If 'cFormPOV represents an initialized HsvPOVSelection control cFormPOV.SetCheckedItems lDim, laIds, laParIds, True, True End Sub