IExpressModeller.History

Fore syntax

History: IEmHistory;

Fore.NET syntax

History: Prognoz.Platform.Interop.Modeller.IEmHistory;

Description

The History property returns express modeling methods calculations history.

Comments

Calculation history is saved if when calling on the IExpressModeller.EvaluateMethod method the SaveToHistory parameter was set to True.

Fore example

To execute the example, add a link to the Modeller system assembly.

The example is a procedure that contains one input parameter ExprMod that is an object that determines express modeling parameters.

Sub GetHistory(ExprMod: IExpressModeller);
Var
    History: IEmHistory;
    i: Integer;
    HisItem: IEmHistoryItem;
    Settings: IEmMethodSettings;
Begin
    History := ExprMod.History;
    If History.Count > 0 Then
        For i := 0 To History.Count - 1 Do
            HisItem := History.Item(i);
            Debug.WriteLine("Calculation: " + HisItem.Index.ToString);
            Settings := HisItem.Settings;
            Debug.WriteLine("  " + Settings.ReportSettings.Title);
            Debug.WriteLine("  saved to the file: " + HisItem.FilePath);
        End For;
        History.Clear;
    End If;
End Sub GetHistory;

Example execution result: express modeling calculations that are specified in the input parameter, history is displayed in the console window; then calculations history is removed.

Fore.NET example

The example is a procedure that contains one input parameter ExprMod that is an object that determines express modeling parameters.

Imports Prognoz.Platform.Interop.Modeller;

Public Shared Sub GetHistory(ExprMod: IExpressModeller);
Var
    History: IEmHistory;
    i: Integer;
    HisItem: IEmHistoryItem;
    Settings: IEmMethodSettings;
Begin
    History := ExprMod.History;
    If History.Count > 0 Then
        For i := 0 To History.Count - 1 Do
            HisItem := History.Item[i];
            System.Diagnostics.Debug.WriteLine("Calculation: " + HisItem.Index.ToString());
            Settings := HisItem.Settings;
            System.Diagnostics.Debug.WriteLine("  " + Settings.ReportSettings.Title);
            System.Diagnostics.Debug.WriteLine("  saved to the file: " + HisItem.FilePath);
        End For;
        History.Clear();
    End If;
End Sub GetHistory;

Example execution result: express modeling calculations that are specified in the input parameter, history is displayed in the console window; then calculations history is removed.

See also:

IExpressModeller