Exemplo n.º 1
0
        public Result OnStartup(UIControlledApplication application)
        {
            Globals.Controller = RevitInteractor.Register(application);
            #region Create panel
            // create electrical Ribbon panel
            var ribbon = application.CreateRibbonPanel("Revit Async Demo");
            ribbon.Title   = "Revit Async Demo";
            ribbon.Visible = true;

            #region Create a split button for switchboard schematics

            //create push button for new schema
            string thisAssemblyPath = Assembly.GetExecutingAssembly().Location;
            var    OpenAddinPush    = new PushButtonData("Open window", "Open window", thisAssemblyPath, typeof(MyCommand).FullName);

            ribbon.AddItem(OpenAddinPush);
            #endregion

            #endregion

            return(Result.Succeeded);
        }
Exemplo n.º 2
0
 public Result OnShutdown(UIControlledApplication application)
 {
     RevitInteractor.Unsubscribe(application);
     return(Result.Succeeded);
 }