ObjectSelection: IDimSelectionSet;
The ObjectSelection property returns the current dimension selection.
To determine whether to set dimension selection by the selection in visualizer, use IEaxObjectSelectionManager.TrackObjectSelection.
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:
The DimSelectionSet variable will store dimension selection by selection in visualizer.
The console displays number of dimensions in selection.
The conversion of selected selection to visual selection will be enabled.
See also: