IMsProblemCalculation.DoSaveHistory

Syntax

DoSaveHistory;

Description

The DoSaveHistory method saves the history of 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 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 is calculated. Calculation history is saved.

See also:

IMsProblemCalculation