IWinApplication.GetPluginTarget

Syntax

GetPluginTarget(PluginName: String): IUiCommandTarget;

Parameters

PluginName. Name of plugin in use.

Description

The GetPluginTarget method creates an object that executes command of a specified plugin.

Comments

The following plugins are available:

Example

To execute the example, make sure that the security manager contains the USER user.

Add links to the Metabase, Ui system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    MbSec: IMetabaseSecurity;

    User: ISecuritySubject;
    Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
    Lic: Object;
Begin
    MB := MetabaseClass.Active;
    
// Get license to work with security manager
    Lic := Mb.RequestLicense(UiLicenseFeatureType.Adm);
    MbSec := MB.Security;

    User := MbSec.ResolveName("USER");
    Target := WinApplication.Instance.GetPluginTarget(
"Adm");
    Context := Target.CreateExecutionContext;
    Context.Data := User;
    Target.Execute(
"ShowHoursPolicy", Context);
    
// Save changes
    MbSec.Apply;
    
// Check in license
    Lic := Null;
End Sub UserProc;

After executing the example a dialog box opens to control access by time for the USER user.

See also:

IWinApplication | IUiCommandTarget