GroupIndex: Integer;
The GroupIndex property determines index of the group, which includes the dimension.
The following groups are provided:
0. Fixed dimensions.
1. Dimensions arranged by columns.
2. Dimensions arranged by rows.
3. Optional dimensions.
Executing the example requires that the repository contains the FC_DEP time series database.
Sub Main;
Var
Mb: IMetabase;
Rubricator: IMetabaseObject;
Cub: ICubeInstance;
Dest: ICubeInstanceDestination;
Sels: IDimSelectionSet;
CubeExSet: ICubeExecuteSetup;
i: Integer;
DimSetup: ICubeExecuteDimSetup;
Exe: ICubeInstanceDestinationExecutor;
Mat: IMatrix;
b: Boolean;
Begin
Mb := MetabaseClass.Active;
Rubricator := Mb.ItemById("FC_DEP").Bind;
Cub := Rubricator.Open(Null) As ICubeInstance;
Dest := Cub.Destinations.DefaultDestination;
Sels := Dest.CreateDimSelectionSet;
CubeExSet := Sels As ICubeExecuteSetup;
For i := 0 To CubeExSet.Count - 1 Do
DimSetup := CubeExSet.Item(i);
Debug.WriteLine(Identifier: + DimSetup.Id);
Debug.WriteLine(Group index: + DimSetup.GroupIndex.ToString);
Debug.WriteLine(Position in group: + DimSetup.Position.ToString);
b := DimSetup.Options.Required = CubeDimensionExecuteOptions.Required;
Debug.WriteLine(b ? Mandatory dimension : Optional dimension);
b := DimSetup.Predefined = Null;
Debug.WriteLine(b ? There are no predetermined positions : Predetermined positions exist);
Select Case DimSetup.Tag
Case CubeDimensionTag.Calendar: Debug.WriteLine(Calendar dimension);
Case CubeDimensionTag.Facts: Debug.WriteLine(Facts dimension);
Case CubeDimensionTag.None: Debug.WriteLine(Dimension type is not defined);
Case CubeDimensionTag.Units: Debug.WriteLine(Units);
End Select;
DimSetup.Selection.SelectAll;
Debug.WriteLine("------");
End For;
Exe := Dest.CreateExecutor;
Exe.PrepareExecute(Sels);
Exe.PerformExecute;
Mat := Exe.Matrix;
End Sub Main;
After executing the example the console window displays group index, position in the group, and other parameters of the dimensions included into default layout of the time series database. The time series database is calculated with the given parameters, and the calculation results are saved to the Mat variable.
See also: