IMsProblemCalculation.DoSaveHistory

Syntax

DoSaveHistory;

Description

The DoSaveHistory method saves history of modeling problem calculation.

Comments

The saving is executed independently of the set value of the SaveData property.

Example

Executing the example requires that the repository contains a modeling container of the problem with the PROBLEM_1 identifier.

Sub UserProc;
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 UserProc;

After executing the example the problem with the PROBLEM_1 identifier will be calculated. Calculation history is saved.

See also:

IMsProblemCalculation