IDimHierarchyInstance.Original

Syntax

Original: IDimInstance;

Description

The Original property returns basic dictionary data.

Comments

The property is read-only.

Example

Executing the example requires a form containing the Button component with the Button component and a MDM dictionary with the DICT identifier, which has the set  alternative hierarchy. The MDM dictionary is located in the repository with the NSI identifier.

Add links to the Metabase and Dimensions system assemblies.

The example is a handler of the OnClick event for the Button1 component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    mb: IMetabase;
    DimInstObj, DimInst: IDimInstance;
    DimHInst: IDimHierarchyInstance;
    DimH: IDimHierarchy;
Begin
    mb := MetabaseClass.Active;
    DimInstObj := mb.ItemByIdNamespace("DICT", mb.GetObjectKeyById("NSI")).Open(NullAs IDimInstance;
    DimHInst := DimInstObj.Hierarchies.Item(0);
    Debug.WriteLine("Data of main dictionary");
    DimInst := DimHInst.Original;
    Debug.Indent;
    Debug.WriteLine("Dictionary identifier: " + DimInst.Ident);
    Debug.WriteLine("Dictionary key: " + DimInst.Key.ToString);
    Debug.WriteLine("Dictionary name: " + DimInst.Name);
    Debug.Unindent;
    Debug.WriteLine("Alternative hierarchy of dictionary");
    DimH := DimHInst.Hierarchy;
    Debug.Indent;
    Debug.WriteLine("Dictionary identifier: " + DimH.Id);
    Debug.WriteLine("Dictionary key: " + DimH.Key.ToString);
    Debug.WriteLine("Dictionary name: " + DimH.Name);
    Debug.Unindent;
End Sub Button1OnClick;

After executing the example data of main dictionary and dictionary alternative hierarchy is displayed in the console window: identifier, key and name.

See also:

IDimHierarchyInstance