IMetaAttributeSetting.OpenedDimension

Syntax

OpenedDimension: IDimInstance;

Description

The OpenedDimension property determines an opened attribute dimension.

Example

Executing the example requires a form, a button named Button1 on the form, the MetaAttributesBreadcrumb component named MetaAttributesBreadcrumb1, and the MetaAttributesTreeList component named MetaAttributesTreeList1. The repository must contain a time series database with the OBJ_FC identifier. This database should contain the custom time series attribute COUNTRY that refers to a dictionary.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    MB: IMetabase;
    RubDesc: IMetabaseObjectDescriptor;
    RubrIn: IRubricatorInstance;
    DictInst: IMetaDictionaryInstance;
    Dict: IMetaDictionary;
    MetaAttrS: IMetaAttributes;
    MetaAttr: IMetaAttribute;
    AttrS: IMetaAttributeSettings;
    Attr: IMetaAttributeSetting;
    OpenedDimension: IDimInstance;
Begin
    MB := MetabaseClass.Active;
    RubDesc := MB.ItemById("OBJ_FC");
    MetaAttributesTreeList1.Rubricator := RubDesc.Bind As IRubricator;
    MetaAttributesTreeList1.Breadcrumb := MetaAttributesBreadcrumb1;
    RubrIn := RubDesc.Open(NullAs IRubricatorInstance;
    MetaAttributesBreadcrumb1.Rubricator := RubrIn;
    DictInst := RubrIn.GetDictionary(RubricatorDictionary.Facts);
    Dict := (DictInst As IMetabaseObjectInstance).Object As IMetaDictionary;
    MetaAttributesTreeList1.Dictionary := Dict;
    MetaAttributesBreadcrumb1.Dictionary := DictInst;
    MetaAttributesBreadcrumb1.MetaAttributes := Dict.Attributes;
    MetaAttrS := Dict.Attributes;
    MetaAttr := MetaAttrS.FindById("COUNTRY");
    OpenedDimension := MetaAttr.ValuesObject.Open(NullAs IDimInstance;
    AttrS := MetaAttributesBreadcrumb1.MetaAttributeSettings;
    Attr := AttrS.FindById("COUNTRY");
    Attr.OpenedDimension := OpenedDimension;
End Sub Button1OnClick;

After executing the example, a dimension is determined for the COUNTRY attribute.

See also:

IMetaAttributeSetting