I am guessing here. Others should correct.
1) Add a ribbon panel (on the fly) - Maybe, but if you do that things might get sticky the next time the command to do that is invoked. The proper method is probably to have the panel always there, but with false visibility if a panel can have that. (BTW, I believe a custom panel can only exist on the Addins Tab or your own custom Tab.) I don't know for sure if a panel visibility can be manipulated like that. I do know that a custom Tab can do that and you can control that Tab to be green or pulsate purple like Revit does with some of its contextual Tabs. Your Plan A might ought to have it be a custom Tab instead of a custom Panel, especially if its intended use is ephemeral.
Making a Tab visible or not.
Autodesk.Windows.RibbonControl revitRibbon = Autodesk.Windows.ComponentManager.Ribbon; Autodesk.Windows.RibbonTab rRibTab = revitRibbon.FindTab("MyTabName"); rRibTab.IsVisible = MyTabVisBool; // true or false
Seeing what tabs you have have. BTW, I think Revit's tabs may not have Title text. Fooling around with the RibbonTab properties will show the ways they can be manipulated.
Autodesk.Windows.RibbonControl revitRibbon = Autodesk.Windows.ComponentManager.Ribbon; string msg = string.Empty; foreach (Autodesk.Windows.RibbonTab tab in revitRibbon.Tabs) { msg += tab.Title + " " + tab.IsVisible.ToString() + "\n"; } System.Windows.Forms.MessageBox.Show(msg);
2) SMALL PushButton - I think I know what you mean by this and I don't think so. You have to use stacked items to get SMALL. If you have one item then you'll have to come up with a real or dummy second item for the stack. Keep in mind the ribbon panel height is fixed. Therefore the panel width is the only size you can control. The text used in the control items in the panel and the panel text itself seems to control the panel width. Maybe a one letter panel name combined with stacked items having no text but only 16x16 images will get you a slim panel. If the purpose for this button is secondary, then you could force it to be down in the panel's slide out panel. You'll have the same size problems down there also. You will need to use stacked items to achieve small.
hi
i'm already make a Tab and Button, but i want give Action to Button, like i want to make it open CMD after press on it, i'm already have another project using C# able me to open CMD so how can i connect them by each other , how can make this button active to open another project or specific CMD ?????????