IDimHierarchyInstance.Original

Fore Syntax

Original: IDimInstance;

Fore.NET Syntax

Original: Prognoz.Platform,Interop.Dimensions.IDimInstance;

Description

The Original property returns basic dictionary data.

Comments

The property is read-only.

Fore 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.

Fore.NET Example

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

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Dimensions;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    mb: IMetabase;
    DimInstObj, DimInst: IDimInstance;
    DimHInst: IDimHierarchyInstance;
    DimH: IDimHierarchy;
Begin
    mb := Self.Metabase;
    DimInstObj := mb.ItemByIdNamespace["DICT", mb.GetObjectKeyById("NSI")].Open(NullAs IDimInstance;
    DimHInst := DimInstObj.Hierarchies.Item[0];
    System.Diagnostics.Debug.WriteLine("Data of main dictionary");
    DimInst := DimHInst.Original;
    System.Diagnostics.Debug.Indent();
    System.Diagnostics.Debug.WriteLine("Dictionary identifier: " + DimInst.Ident);
    System.Diagnostics.Debug.WriteLine("Dictionary key: " + DimInst.Key.ToString());
    System.Diagnostics.Debug.WriteLine("Dictionary name: " + DimInst.Name);
    System.Diagnostics.Debug.Unindent();
    System.Diagnostics.Debug.WriteLine("Alternative hierarchy of dictionary");
    DimH := DimHInst.Hierarchy;
    System.Diagnostics.Debug.Indent();
    System.Diagnostics.Debug.WriteLine("Dictionary identifier: " + DimH.Id);
    System.Diagnostics.Debug.WriteLine("Dictionary key: " + DimH.Key.ToString());
    System.Diagnostics.Debug.WriteLine("Dictionary name: " + DimH.Name);
    System.Diagnostics.Debug.Unindent();
End Sub;

See also:

IDimHierarchyInstance