OpenDictionary Command

Purpose

Opens an MDM dictionary for view.

Parameters of Use

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

Value type Description
IRdsDictionary MDM dictionary (composite MDM dictionary) to be opened for view.

Application Features

The command can be executed only for MDM dictionaries (composite MDM dictionaries).

Example

Executing the example requires a form and a button named Button1 on the form. The repository contains a MDM repository with the NSI_1 and this repository contains the Dict_1 dictionary.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    MB: IMetabase;
    NSI: IRdsDictionary;
    Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
Begin
    MB := MetabaseClass.Active;
    NSI := MB.ItemByIdNamespace("Dict_1", MB.ItemById("NSI_1").Key).Bind As IRdsDictionary;
    Target := WinApplication.Instance.GetPluginTarget("Rds");
    Context := Target.CreateExecutionContext;
    Context.Data := NSI;
    Target.Execute("OpenDictionary", Context);
End Sub Button1OnClick;

Clicking the button opens the Dict_1 MDM dictionary for view.

See also:

IUiCommandTarget.Execute