CreateLoadSettings: IMsVariableLoadSettings;
The CreateLoadSettings method creates an object defining parameters of loading data to the modeling variable.It is used on data loading by means of the formula.
Executing the example requires that the modeling container includes a variable that is adjusted to data loading by means of 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: