GetPluginTarget(PluginName: String): IUiCommandTarget;
GetPluginTarget(PluginName: string): Prognoz.Platform.Interop.Ui.IUiCommandTarget;
PluginName. Name of plugin in use.
The GetPluginTarget method creates an object that executes command of a specified plugin.
The following plugins are available:
Adm. Administration commands.
Cubes. Multidimensional data source commands.
Db. Table commands.
DevEnv. Development environment object commands.
Dim. Dictionary commands.
Etl. ETL task commands.
Express. The Analytical Queries (OLAP) tool commands.
FactRubricator. The Time Series Analysis tool commands.
Fld. Repository object commands.
MetabaseUpdate. The Update Manager tool commands.
Mobile. Mobile application container commands.
Modeller. Express modeling commands.
Ms. The Modeling and Forecasting tool commands.
Rds. MDM dictionary commands.
Report. The Reports tool commands.
Std. Object navigator commands.
Wsp. The Workspace tool commands.
Executing the example requires a form and a button named Button1 on the form.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Mb: IMetabase;
MbSec: IMetabaseSecurity;
User: IMetabaseUser;
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Begin
MB := MetabaseClass.Active;
MbSec := MB.Security;
User := MbSec.Users.Item(0);
Target := WinApplication.Instance.GetPluginTarget("Adm");
Context := Target.CreateExecutionContext;
Context.Data := User;
Target.Execute("ShowHoursPolicy", Context);
End Sub Button1OnClick;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Ui;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
Mb: IMetabase;
MbSec: IMetabaseSecurity;
User: IMetabaseUser;
WinApp: WinApplication = New WinApplicationClass_2();
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Begin
MB := Self.Metabase;
MbSec := MB.Security;
User := MbSec.Users.Item[0];
Target := WinApp.GetPluginTarget("Adm");
Context := Target.CreateExecutionContext();
Context.Data := User;
Target.Execute("ShowHoursPolicy", Context, Null);
End Sub;
Clicking the button opens a dialog box that is used to control system access by time for the first user registered in the security manager.
See also: