IEmSeries.ItemIndexByName

Fore syntax

ItemIndexByName(Name: String): Integer;

Fore.NET syntax

ItemIndexByName[Name: String]: integer;

Parameters

Name. Series identifier.

Description

The ItemIndexByName property returns series index based on its identifier.

Comments

If the series with the specified identifier does not exist, the method returns -1.

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 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.

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 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:

IEmSeries