IAdoMdDimensionInstance.DimensionInstance

Fore Syntax

DimensionInstance: IDimInstance;

Fore.NET Syntax

DimensionInstance: Prognoz.Platform.Interop.Dimensions.IDimInstance;

Description

The DimensionInstance property returns an instance of the dictionary described in the IDimInstance interface.

Fore Example

Executing the example requires a form and the UiDimension and DimensionTree components on this form named UiDimension1 and DimensionTree1 respectively. The repository contains the ADOMD catalog with the ADOMDTest identifier. The catalog includes the ADOMD dictionary with the DimTest identifier.

Class TESTForm: Form
    UiDimension1: UiDimension;
    DimensionTree1: DimensionTree;

    Sub TESTFormOnCreate(Sender: Object; Args: IEventArgs);
    Var
        MB: IMetabase;
        ADOMDDim: IAdoMdDimensionInstance;
        DimInst: IDimInstance;
    Begin
        MB := MetabaseClass.Active;
        ADOMDDim := MB.ItemByIdNamespace("TestDim", MB.GetObjectKeyById("ADOMDTest")).Open(NullAs IAdoMdDimensionInstance;
        UiDimension1.Active := False;
        UiDimension1.Instance := ADOMDDim.DimensionInstance;
        DimensionTree1.Dimension := UiDimension1;
    End Sub TESTFormOnCreate;

End Class TESTForm;

When the form is started, an open instance of the ADOMD dictionary is obtained. The instance is uploaded into the UiDimension1 component, which is set as a data source for DimensionTree1.

Fore.NET Example

Executing the example requires a .NET form and the UiDimensionNet and DimensionTreeNet components on this form named UiDimensionNet1 and DimensionTreeNet1 respectively. The repository contains the ADOMD catalog with the ADOMDTest identifier. The catalog includes the ADOMD dictionary with the DimTest identifier.

Imports Prognoz.Platform.Forms.Net;
Imports Prognoz.Platform.Interop.AdoMd;
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Metabase;

Public Partial Class TESTForm: Prognoz.Platform.Forms.Net.ForeNetForm
    Public Constructor TESTForm();
    Begin
        InitializeComponent();
    End Constructor;

    Private Sub TESTForm_Load(sender: System.Object; e: System.EventArgs);
    Var
        MB: IMetabase;
        ADOMDDim: IAdoMdDimensionInstance;
        DimInst: IDimInstance;
    Begin
        MB := Self.Metabase;
        ADOMDDim := MB.ItemByIdNamespace["TestDim", MB.GetObjectKeyById("ADOMDTest")].Open(NullAs IAdoMdDimensionInstance;
        UiDimensionNet1.Active := True;
        UiDimensionNet1.ComponentBox.Instance := ADOMDDim.DimensionInstance;
        DimensionTreeNet1.Dimension := UiDimensionNet1;
    End Sub;

End Class;

When the form is started, an open instance of the ADOMD dictionary is obtained. The given instance is uploaded into the UiDimensionNet1 component, that is set as a data source for DimensionTreeNet1.

See also:

IAdoMdDimensionInstance