ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Framework Namespace / IPlugInWrapper Interface
Members Example

In This Topic
    IPlugInWrapper Interface
    In This Topic
    The public interface for DAML defined controls.
    Syntax
    public interface IPlugInWrapper 
    Public Interface IPlugInWrapper 
    Remarks
    Controls defined in DAML and added to the ribbon control are not directly accessible by other clients. Instead, 3rd parties can use FrameworkApplication.GetCommandWrapper to access a limited set of functionality such as updating a command's caption at run-time.
    Example
    Programmatically start Edit Annotation
    var plugin = FrameworkApplication.GetPlugInWrapper("esri_editing_EditVerticesText");
    if (plugin.Enabled)
      ((ICommand)plugin).Execute(null);
    Execute a command
    IPlugInWrapper wrapper = FrameworkApplication.GetPlugInWrapper("esri_editing_ShowAttributes");
    var command = wrapper as ICommand; // tool and command(Button) supports this
    
    if ((command != null) && command.CanExecute(null))
      command.Execute(null);
    
    Set the current tool
    // use SetCurrentToolAsync
    FrameworkApplication.SetCurrentToolAsync("esri_mapping_selectByRectangleTool");
    
    // or use ICommand.Execute
    ICommand cmd = FrameworkApplication.GetPlugInWrapper("esri_mapping_selectByRectangleTool") as ICommand;
    if ((cmd != null) && cmd.CanExecute(null))
      cmd.Execute(null);
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also