ElementGroupsDialog Command

Purpose

Opens the dialog box that is used to set up groups of dictionary elements.

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
IMetabaseObjectDescriptor Repository dictionary description.

Application Features

The command can be executed only for repository dictionaries. Executing the command shows logical True if the OK button is clicked, and logical False if the Cancel button is clicked. Clicking the OK button saves all pending changes.

Fore Example

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

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

Clicking the button opens the dialog box for setting up groups of elements for the specified dictionary.

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.Ui;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    MB: IMetabase;
    Dim: IMetabaseObjectDescriptor;
    WinApp: WinApplication = New WinApplicationClass_2();
    Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
Begin
    MB := Self.Metabase;
    Dim := MB.ItemById["STD_DIM"];
    Target := WinApp.GetPluginTarget("Dim");
    Context := Target.CreateExecutionContext();
    Context.Data := Dim;
    Target.Execute("ElementGroupsDialog", Context, Null);
End Sub;

See also:

IUiCommandTarget.Execute