ActiveItem: Integer;
ActiveItem: integer;
The ActiveItem property returns current record index to the calculation histories.
Indexation of the records is continuous and starts from zero. To get specified record, use the IEmHistory.Item method.
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 GetHist(ExprMod: IExpressModeller);
Var
History: IEmHistory;
i: Integer;
HisItem: IEmHistoryItem;
Begin
History := ExprMod.History;
If History.Count > 0 Then
For i := 0 To History.ActiveItem Do
History.Undo;
End For;
HisItem := History.Item(0);
If HisItem.Method = EmStatMethod.Statistics Then
History.Redo;
End If;
End If;
End Sub GetHist;
Example execution result: express modeling methods calculation history navigation, specified in the input parameter, is executed. First, transition to the first calculated method is executed, if this is the Summary Statistics Calculation method, transition to the second method is executed.
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 GetHist(ExprMod: IExpressModeller);
Var
History: IEmHistory;
i: Integer;
HisItem: IEmHistoryItem;
Begin
History := ExprMod.History;
If History.Count > 0 Then
For i := 0 To History.ActiveItem Do
History.Undo();
End For;
HisItem := History.Item[0];
If HisItem.Method = EmStatMethod.emsmStatistics Then
History.Redo();
End If;
End If;
End Sub GetHist;
Example execution result: express modeling methods calculation history navigation, specified in the input parameter, is executed. First, transition to the first calculated method is executed, if this is the Summary Statistics Calculation method, transition to the second method is executed.
See also: