ICubeExecuteDimSetup.Position

Syntax

Position: Integer;

Description

The Position property determines position of the dimension in a group.

Example

Executing the example requires that the repository contains the FC_DEP time series database.

Sub UserProc;
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(
NullAs 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" : "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("Factor dimension");
            
Case CubeDimensionTag.None: Debug.WriteLine("Dimension type is not determined");
            
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 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 the calculation results are saved to the Mat variable.

See also:

ICubeExecuteDimSetup