IVariableStub.NamingDimension

Fore Syntax

NamingDimension(Index: Integer): IDimensionModel;

Fore.NET Syntax

NamingDimension[Index: integer]: Prognoz.Platform.Interop.Dimensions.IDimensionModel;

Parameters

Index. Dimension index.

Description

The NamingDimension property returns the structure of the dimension that is used to create names.

Comments

The property is relevant if the data source is the time series database. The dimension is used to create names of models and calculated series.

Dimensions will be arranged in the order specified in the IRubricator.Facts.AttributeNamings property. To get the number of dimensions, use the IVariableStub.DimensionCount property.

Fore Example

Executing the example requires that the repository contains a time series database with the TSDB identifier.

Add links to the Cubes and Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Rubr: IRubricator;
    Stub: IVariableStub;
    i: Integer;
Begin
    // Get current repository
    MB := MetabaseClass.Active;
    // Get time series database as an abstract data source
    Rubr := MB.ItemById("TSDB").Bind As IRubricator;
    Stub := Rubr As IVariableStub;
    // Display dimensions that are used to create names in the console window
    For i := 0 To Stub.DimensionCount - 1 Do
        Debug.WriteLine((Stub.NamingDimension(i) As IMetabaseObject).Name);
    End For;
End Sub UserProc;

After executing the example the console window displays names of dimensions that are used to create names.

Fore.NET Example

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

Imports Prognoz.Platform.Interop.Cubes;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Rubr: IRubricator;
    Stub: IVariableStub;
    i: Integer;
Begin
    // Get current repository
    MB := Params.Metabase;
    // Get time series database as an abstract data source
    Rubr := MB.ItemById["TSDB"].Bind() As IRubricator;
    Stub := Rubr As IVariableStub;
    // Display dimensions that are used to create names in the console window
    For i := 0 To Stub.DimensionCount - 1 Do
        System.Diagnostics.Debug.WriteLine((Stub.NamingDimension[i] As IMetabaseObject).Name);
    End For;
End Sub;

See also:

IVariableStub