IMDCalculationInstance.Apply

Syntax

Apply(App: ICubeSelectionControlApply): Boolean;

Parameters

App. Dimension selection.

Description

The Apply method applies calculation parameters according to dimension selection.

Example

Executing the example requires that the repository contains multidimensional calculation with the MDCALC identifier.

Sub UserProc;
Var
    MB: IMetabase;
    Calc: IMDCalculation;
    CalcInst: IMDCalculationInstance;
    Apply: ICubeSelectionControlApply;
    SelS: IDimSelectionSet;
    Sel: IDimSelection;
Begin
    MB := MetabaseClass.Active;
    Calc := MB.ItemById("MDCALC").Bind As IMDCalculation;
    CalcInst := (Calc As IMetabaseObject).Open(NullAs IMDCalculationInstance;
    Apply := CalcInst.CreateApply(CalcInst.Destination);
    SelS := CalcInst.Sources.Item(0).DimensionSet;
    Debug.WriteLine("---Source---");
    Apply.SourceSelection := SelS;
    For Each Sel In SelS Do
        Debug.WriteLine(Sel.Dimension.Name);
    End For;
    CalcInst.Apply(Apply);
    Debug.WriteLine("---Result---");
    SelS := Apply.ResultSelection;
    For Each Sel In SelS Do
        Debug.WriteLine(Sel.Dimension.Name);
    End For;
End Sub UserProc;

After executing the example the object that controls parameters of multidimensional calculation via selection is created. This object will be executed. The source list of changes and output changes list will be displayed.

See also:

IMDCalculationInstance.Apply