IMsVariableLoadSettings.Period

Syntax

Period: IMsModelPeriod;

Description

The Period property returns the period, data for which should be loaded to the variable.

Example

Executing the example requires that the modeling container includes the Var_1 variable that is set up for data loading by the formula.

 

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Variable: IMsVariable;

LoadSetting: IMsVariableLoadSettings;

Period: IMsModelPeriod;

i: Integer;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemByIdNamespace("Var_1", MB.ItemById("KONT_MODEL").Key).Edit;

Variable := MObj As IMsVariable;

LoadSetting := Variable.CreateLoadSettings;

Period := LoadSetting.Period;

Period.IdentificationStartDate := DateTime.ComposeDay(2000, 1, 1);

Period.IdentificationEndDate := DateTime.ComposeDay(2004, 1, 1);

LoadSetting.ScenarioIncluded(-1) := True;

For i := 0 To LoadSetting.DimensionFix.Count - 1 Do

LoadSetting.DimensionFix.Selection.Item(i).SelectAll;

End For;

Variable.Execute(LoadSetting);

MObj.Save;

End Sub Main;

After executing the example the parameters necessary for data loading in a variable are determined, then data is loaded.

See also:

IMsVariableLoadSettings