DoSaveHistory;
The DoSaveHistory method saves history of modeling problem calculation.
The saving is executed independently of the set value of the SaveData property.
Executing the example requires that the repository contains a modeling container of the problem with the PROBLEM_1 identifier.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Problem: IMsProblem;
CalcSett: IMsProblemCalculationSettings;
Calculation: IMsProblemCalculation;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemByIdNamespace("PROBLEM_1", MB.ItemById("KONT_MODEL").Key).Edit;
Problem := MObj As IMsProblem;
CalcSett := Problem.CreateCalculationSettings;
Calculation := Problem.Calculate(CalcSett);
Calculation.Run;
Calculation.DoSaveHistory;
MObj.Save;
End Sub Main;
After executing the example the problem with the PROBLEM_1 identifier will be calculated. Calculation history is saved.
See also: