IMDCalculationScheduledTask.LoadCalculationArgs

Syntax

LoadCalculationArgs(Value: IMDCalculationCalculateArgs): IMDCalculationCalculateArgs;

Parameters

Value - parameters of multidimensional calculation execution on DB server.

Description

The LoadCalculationArgs method returns multidimensional calculation execution parameters.

Comments

The object that can be created using the IMDCalculationInstance.CreateCalculateArgs method must be passed as the Value parameter.

Use the IMDCalculationScheduledTask.SetCalculationArgs property to set multidimensional calculation parameters.

Example

Executing the example requires that the repository contains a scheduled tasks container with the Scheduled_Tasks_Cont identifier. This container must include only task of executing multidimensional calculation on DB server. It is also necessary to add links to the Cube, Fore and Metabase system assemblies.

Sub Main;

Var

MB: IMetabase;

ScheduledTaskCont: IScheduledTasksContainer;

TaskObj: IMetabaseObject;

MDCalc: IMDCalculation;

MDCalcTask: IMDCalculationScheduledTask;

MDCalcDescr: IMetabaseObjectDescriptor;

CalcArgs: IMDCalculationCalculateArgs;

MDTabInst: IMDCalculationInstance;

Begin

Mb := MetabaseClass.Active;

ScheduledTaskCont := MB.ItemById("Scheduled_Tasks_Cont").Bind As IScheduledTasksContainer;

TaskObj := ScheduledTaskCont.Tasks.Item(0).Edit;

MDCalcTask := TaskObj As IMDCalculationScheduledTask;

MDCalc := MDCalcTask.SourceCalculation;

MDCalcDescr := MDCalc As IMetabaseObjectDescriptor;

MDTabInst := MDCalcDescr.Open(Null) As IMDCalculationInstance;

CalcArgs := MDTabInst.CreateCalculateArgs;

CalcArgs := MDCalcTask.LoadCalculationArgs(CalcArgs);

CalcArgs.CleanType := MDCalculateArgsCleanType.Existing;

CalcArgs.UpdateType := MDCalculateArgsUpdateType.NotNull;

CalcArgs.Recursion := TriState.OnOption;

MDCalcTask.SetCalculationArgs(CalcArgs);

TaskObj.Save;

End Sub Main;

After executing the example parameters of multidimensional calculation execution on DB server are changed for the task.

See also:

IMDCalculationScheduledTask