ILanerSeries.AddEmptyGroup

Fore Syntax

AddEmptyGroup(SerieName: String; [Index: Integer = -1]): ILanerGroupSerie;

Fore.NET Syntax

AddEmptyGroup(SerieName: string; Index: integer): Prognoz.Platform.Interop.Laner.ILanerGroupSerie;

Parameters

SerieName. Name of the added group.

Index. Index of the position where the group should be added.

Description

The AddEmptyGroup method adds an empty group of series.

Fore Example

Executing the example requires a workbook with the WORKBOOK_SERIES identifier that contains several series.

Add links to the Express, Laner and Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    WbkObj: IMetabaseObject;
    EaxAn: IEaxAnalyzer;
    Laner: ILaner;
    Series: ILanerSeries;
    Group: ILanerGroupSerie;
    Serie: ILanerSerie;
Begin
    
// Get workbook
    mb := MetabaseClass.Active;
    WbkObj := mb.ItemById(
"WORKBOOK_SERIES").Edit;
    EaxAn := WbkObj 
As IEaxAnalyzer;
    Laner := EaxAn.Laner;
    
// Get workbook series
    Series := Laner.Series;
    
// Create a new group
    Group := Series.AddEmptyGroup("New group"1);
    
// Get the last series of the workbook
    Serie := Series.Item(Series.Count - 1);
    
// Move the obtained series to the created group
    Serie.MoveToParent(Group, 0);
    
// Save changes
    WbkObj.Save;
End Sub UserProc;

After executing the example the group, to which the last series is moved, is created after the first workbook series.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports  Prognoz.Platform.Interop.Express;
Imports  Prognoz.Platform.Interop.Laner;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    WbkObj: IMetabaseObject;
    EaxAn: IEaxAnalyzer;
    Laner: ILaner;
    Series: ILanerSeries;
    Group: ILanerGroupSerie;
    Serie: ILanerSerie;
Begin
    // Get workbook
    mb := Params.Metabase;
    WbkObj := mb.ItemById["WORKBOOK_SERIES"].Edit();
    EaxAn := WbkObj As IEaxAnalyzer;
    Laner := EaxAn.Laner;
    // Get workbook series
    Series := Laner.Series;
    // Create a new group
    Group := Series.AddEmptyGroup("New group"1);
    // Get the last series of the workbook
    Serie := Series.Item[Series.Count - 1];
    // Move the obtained series to the created group
    Serie.MoveToParent(Group, 0);
    // Save changes
    WbkObj.Save();
End Sub;

See also:

ILanerSeries