ShowMetabaseObject Command

Purpose

It moves focus to the object navigator and shows the specified repository object.

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 Description of the object that must be shown in the object navigator.

Application Features

None.

Example

Executing the example requires a form with the Button1 button and an object with the Document identifier.

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

Clicking the button moves to the object navigator where the specified object is shown.

See also:

IUiCommandTarget.Execute