IDimensionModel.AttributeHierarchies

Fore Syntax

AttributeHierarchies: IDimAttributeHierarchies;

Fore.NET Syntax

AttributeHierarchies: Prognoz.Platform.Interop.Dimensions.IDimAttributeHierarchies;

Description

The AttributeHierarchies property returns collection of dictionary attributes alternative hierarchies.

Comments

Collection gets hierarchies which attributes are used as alternative hierarchies.

Fore Example

Executing the example requires that repository contains table dictionary with the DIM_SEP identifier.

Add links to the Dimensions, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    dimmodel: IDimensionModel;
    attrhiearchy: IDimAttributeHierarchies;
    count: Integer;
Begin
    // Get repository
    mb := MetabaseClass.Active;
    // Get dictionary structure
    dimmodel := mb.ItemById("DIM_SEP").Bind As IDimensionModel;
    // Get collection of attributes alternative hierarchies
    attrhiearchy := dimmodel.AttributeHierarchies;
    // Get number of alternative hierarchies
    count := attrhiearchy.Count;
    // Display number to the console
    Debug.WriteLine("Number of alternative hierarchies = " + count.ToString);
End Sub UserProc;

After executing the example the console displays number of attributes hierarchies alternative hierarchies of specified dictionary.

Fore.NET Example

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

Imports Prognoz.Platform.Interop.Dimensions;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    dimmodel: IDimensionModel;
    attrhiearchy: IDimAttributeHierarchies;
    count: Integer;
Begin
    // Get repository
    mb := Params.Metabase;
    // Get dictionary structure
    dimmodel := mb.ItemById["DIM_SEP"].Bind() As IDimensionModel;
    // Get collection of dictionary alternative hierarchies
    attrhiearchy := dimmodel.AttributeHierarchies;
    // Get number of attributes alternative hierarchies
    count := attrhiearchy.Count;
    // Display number to the console
    System.Diagnostics.Debug.WriteLine("Number of alternative hierarchies = " + count.ToString);
End Sub;

See also:

IDimensionModel