OpenDimension Command

Purpose

Opens a dictionary for view.

Parameters of Use

Command parameters are passed in the Data property. Executing the command requires to specify the following value in the property:

Value type Description
IDimInstance The opened dictionary, for which it is necessary to display data viewing window.

Application Features

The command can be used only for repository dictionaries.

Example

Executing the example requires a form and a button named Button1 on the form. The repository contains a dictionary with the Dim_1 identifier.

    Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Var
        MB: IMetabase;
        Dim: IDimInstance;
        Target: IUiCommandTarget;
        Context: IUiCommandExecutionContext;
    Begin
        MB := MetabaseClass.Active;
        Dim := MB.ItemById("Dim_1").Open(NullAs IDimInstance;
        Target := WinApplication.Instance.GetPluginTarget("Dim");
        Context := Target.CreateExecutionContext;
        Context.Data := Dim;
        Target.Execute("OpenDimension", Context);
    End Sub Button1OnClick;

Clicking the button opens the Dim_1 dictionary for view.

See also:

IUiCommandTarget.Execute