IEaxObjectSelectionManager.ObjectSelection

Syntax

ObjectSelection: IDimSelectionSet;

Description

The ObjectSelection property returns the current dimension selection.

Comments

To determine whether to set dimension selection by the selection in visualizer, use IEaxObjectSelectionManager.TrackObjectSelection.

Example

Executing the example requires that the repository contains an express report with the EXPRESS_SELECTIONMANAGER identifier that contains a chart.

Add links to the Dimensions, Express, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    analyzer: IEaxAnalyzer;
    chart: IEaxObject;
    objselmanager: IEaxObjectSelectionManager;
    dimselectionset: IDimSelectionSet;
    count: integer;
Begin
    // Get repository
    mb := MetabaseClass.Active;
    // Get express report
    analyzer := mb.ItemById("EXPRESS_SELECTIONMANAGER").Edit As IEaxAnalyzer;
    // Get chart
    chart := analyzer.Chart As IEaxObject;
    // Get selection control
    objselmanager := chart.SelectionManager;
    // Enable conversion of selected selection to visual selection
    objselmanager.AcceptDataSelection := True;
    // Put selections in dimensions
    objselmanager.TrackObjectSelection := True;
    // Get object with selected selections
    dimselectionset := objselmanager.ObjectSelection;
    // Display number of dimensions with selected selections
    count := dimselectionset.Count;
    Debug.WriteLine("Number of dimensions with active selections  = " + count.ToString);
    //Save changes
    (analyzer As IMetabaseObject).Save;
End Sub UserProc;

After executing the example:

See also:

IEaxObjectSelectionManager