AddEmptyGroup(SerieName: String; [Index: Integer = -1]): ILanerGroupSerie;
SerieName. Name of the added group.
Index. Index of the position where the group should be added.
The AddEmptyGroup method adds an empty group of series.
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.
See also: