title: how to get rid of addin security of winform
body: <p><a href="https://i.stack.imgur.com/1jqiD.gif" rel="nofollow noreferrer">Security addin window</a></p>
  
  <p>Hi,
  i have multiple external command created and dock it into it's own Revit tab. however, when i add a winform to one of the commands it is now asking me for another security addin pop-up window when Revit launch. as you can see in GiF. Is there a way to get it rid of this? </p>
  
  <p>here is my code for external command interface:</p>
  
  <p>` [Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
      public class DeleteUnusedFilter : IExternalCommand
      {</p>
  
  <pre><code>    public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
      {
          UIDocument uidoc = commandData.Application.ActiveUIDocument;
          Document doc = uidoc.Document;
  
               var Form = new DeleteFilter(commandData);
              try
              {
                  var fltr = new FilterData(doc).GetUnusedFilter();
                  if (fltr.Count == 0)
                  {
                      MessageInfo.Display("No unused View Filters in Document");
                      Form.Close();
                  return Result.Cancelled;
                  }
  
                  Form.ShowDialog();
                  return Autodesk.Revit.UI.Result.Succeeded;
              }
              catch (Exception ex)
              {
  
                  message = ex.Message;
                  return Autodesk.Revit.UI.Result.Failed;
              }
  
      }
  }`
  </code></pre>
  
  <p>and here is for winform code:</p>
  
  <pre><code> public partial class DeleteFilter : System.Windows.Forms.Form
  {
      Document doc;
      List&lt;Element&gt; FiltersToDelete;
      public DeleteFilter(ExternalCommandData commandData)
      {
          InitializeComponent();
          doc = commandData.Application.ActiveUIDocument.Document;
      }
  
  
  
      private void DeleteFilter_Load(object sender, EventArgs e)
      {
          callonload();
  
      }
  }
  </code></pre>
  
  <p>here is for UiApplication that register the plugin:</p>
  
  <pre><code> //ribbon for delete unused filter
          string path3 = Assembly.GetExecutingAssembly().Location;
          var button3 = new PushButtonData("Button2", "Delete\n Unused Filter", path2, "RevitCode.DeleteUnusedFilter");
          var panel3 = application.CreateRibbonPanel("Angelo Tools", "Delete");
  
          Uri imagePath3 = new Uri(@"C:\ProgramData\Autodesk\Revit\Addins\2019\icon\DeleteFtr.png");
          BitmapImage image3 = new BitmapImage(imagePath3);
          button3.ToolTip = "Delete Unused View Filters";
          PushButton Push_button3 = panel3.AddItem(button3) as PushButton;
          Push_button3.LargeImage = image3;
  
          return Result.Succeeded;
  </code></pre>
  
  <p>thanks in advance!</p>