IMsProblemCalculation.SaveHistoryMask

Syntax

SaveHistoryMask: MsCalculationHistorySet;

Description

The SaveHistoryMask property determines parameters of modeling problem calculation log.

Comments

The IMsproblemCalculation.SaveHistory property influences the value of this property. If the IMsproblemCalculation.SaveHistory property is set to True, SaveHistoryMask is set to MsCalculationHistorySet.Full.

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

Example

Executing the example requires that the repository contains 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.SaveHistoryMask := MsCalculationHistorySet.Log

Calculation.Run;

MObj.Save;

End Sub Main;

After executing the example the problem with the PROBLEM_1 identifier is calculated. The history of calculation is saved as a log.

See also:

IMsProblemCalculation