ItemIndexByName(Name: String): Integer;
ItemIndexByName[Name: String]: integer;
Name. Series identifier.
The ItemIndexByName property returns series index based on its identifier.
If the series with the specified identifier does not exist, the method returns -1.
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 SeriesInf(ExprMod: IExpressModeller);
Var
Series: IEmSeries;
i: Integer;
Begin
Series := ExprMod.Series;
If Series.Count > 0 Then
i := Series.ItemIndexByName("X1");
If i <> -1 Then
Series.Remove(i);
End If;
End If;
End Sub SeriesInf;
Example execution result: in the source series collection a search of the series with the X1 identifier is executed, if the series is found, it is removed.
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 SeriesInf(ExprMod: IExpressModeller);
Var
Series: IEmSeries;
i: Integer;
Begin
Series := ExprMod.Series;
If Series.Count > 0 Then
i := Series.ItemIndexByName["X1"];
If i <> -1 Then
Series.Remove(i);
End If;
End If;
End Sub SeriesInf;
Example execution result: in the source series collection a search of the series with the X1 identifier is executed, if the series is found, it is removed.
See also: