It moves focus to the object navigator and shows contents of the specified container object.
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 container object, which contents must be displayed in the object navigator. |
The command can be used only for container objects. If description of the object that is not a container is passed in the Data property, it moves to the object navigator without changing the displayed object. The following objects can be container objects: Folder, MDM Repository, Time Series Database, Modeling Container, Assembly, .NET Assembly, custom class objects.
Executing the example requires a form with the Button1 button and a repository folder with the F_WORK identifier.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
MDesc: IMetabaseObjectDescriptor;
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Begin
MB := MetabaseClass.Active;
MDesc := MB.ItemById("F_WORK");
Target := WinApplication.Instance.GetPluginTarget("Std");
Context := Target.CreateExecutionContext;
Context.Data := MDesc;
Target.Execute("ShowMetabaseFolder", Context);
End Sub Button1OnClick;
Clicking the button moves to the object navigator, where the contents of the specified folder is shown.
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;
MDesc: IMetabaseObjectDescriptor;
WinApp: WinApplication = New WinApplicationClass_2();
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Begin
MB := Self.Metabase;
MDesc := MB.ItemById["F_WORK"];
Target := WinApp.GetPluginTarget("Std");
Context := Target.CreateExecutionContext();
Context.Data := MDesc;
Target.Execute("ShowMetabaseFolder", Context, Null);
End Sub;
See also: