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 UserProc;
Var
Mb: IMetabase;
CubeInst: ICubeInstance;
Dest: ICubeInstanceDestination;
Sels: IDimSelectionSet;
CubeExSet: ICubeExecuteSetup;
i: Integer;
DimSetup: ICubeExecuteDimSetup;
Exec: ICubeInstanceDestinationExecutor;
Matr: IMatrix;
b: Boolean;
Begin
Mb := MetabaseClass.Active;
CubeInst := Mb.ItemById("FC_DEP").Open(Null) As ICubeInstance;
Dest := CubeInst.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" : "Non-mandatory dimension");
b := DimSetup.Predefined = Null;
Debug.WriteLine(b ? "No predetermined options" : "Predetermined options are available");
Select Case DimSetup.Tag
Case CubeDimensionTag.Calendar: Debug.WriteLine("Calendar dimension");
Case CubeDimensionTag.Facts: Debug.WriteLine("Fact dimension");
Case CubeDimensionTag.None: Debug.WriteLine("Dimension type is undefined");
Case CubeDimensionTag.Units: Debug.WriteLine("Measurement units");
End Select;
DimSetup.Selection.SelectAll;
Debug.WriteLine("------");
End For;
Exec := Dest.CreateExecutor;
Exec.PrepareExecute(Sels);
Exec.PerformExecute;
Matr := Exec.Matrix;
End Sub UserProc;
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 calculation results are moved to the Matr variable.
See also: