IMsProblemCalculation.SaveHistory

Syntax

SaveHistory: Boolean;

Description

The SaveHistory property determines whether history of modeling problem calculation is saved.

Comments

Available values:

The IMsproblemCalculation.SaveHistoryMask property influences the value of this property. If the value IMsproblemCalculation.SaveHistoryMask is set to any type of MsCalculationHistorySet, except for MsCalculationHistorySet.None, SaveHistory is automatically set to True. If IMsproblemCalculation.SaveHistoryMask is set to MsCalculationHistorySet.None,SaveHistory is automatically set to False.

Example

Executing the example requires that the repository includes a modeling container with the KONT_MODEL identifier. This container must include a 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.SaveHistory := True;

Calculation.Run;

MObj.Save;

End Sub Main;

After executing the example the problem with the PROBLEM_1 identifier will be calculated. Full history of calculation is saved.

See also:

IMsProblemCalculation