IEaxObjectSelectionManager.ObjectSelection

Fore Syntax

ObjectSelection: IDimSelectionSet;

Fore.NET Syntax

ObjectSelection: Prognoz.Platform.Interop.Dimensions.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.

Fore 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:

Fore.NET Example

The requirements and result of the Fore.NET Example execution match with those in the Fore Example.

Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Express;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    analyzer: IEaxAnalyzer;
    object: IEaxObject;
    objselmanager: IEaxObjectSelectionManager;
    dimselectionset: IDimSelectionSet;
    count: integer;
Begin
    // Get repository
    mb := Params.Metabase;
    // Get express report
    analyzer := mb.ItemById["EXPRESS_SELECTIONMANAGER"].Edit() As IEaxAnalyzer;
    // Get chart
    object := analyzer.Chart As IEaxObject;
    // Get selection control
    objselmanager := object.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;
    System.Diagnostics.Debug.WriteLine("Number of dimensions with active selections  = " + count.ToString());
    //Save changes
    (analyzer As IMetabaseObject).Save();
End Sub;

See also:

IEaxObjectSelectionManager