IMetaDictionary.NewHierarchy

Syntax

NewHierarchy(Attributes: IMetaAttributesSet): IMetaHierarchy;

Parameters

Attributes is a set of attributes of time series database.

Description

The NewHierarchy method creates hierarchy of time series database by specified attributes.

Example

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

Sub Main;

Var

Mb: Imetabase;

Rubr: IRubricator;

Facts: IMetaDictionary;

Hierarchy: IMetaHierarchy;

Atts: IMetaAttributes;

AttsSet: IMetaAttributesSet;

Begin

Mb := MetabaseClass.Active;

Rubr := MB.ItemById("OBJ_FC").Edit As IRubricator;

Facts := Rubr.Facts;

Atts := Facts.Attributes;

AttsSet := Atts.CreateSubset("REV;DL", SubsetOperation.Select_);

Hierarchy := Facts.NewHierarchy(AttsSet);

End Sub Main;

After executing the example a new hierarchy that consists of two levels is saved in the Hierarchy variable for system time series dictionary.

See also:

IMetaDictionary