The easiest way I know to add a RibbonPanel in the modify tab is to move a existent Autodesk.Revit.UI.RibbonPanel to the 'Modify' Autodesk.Windows.RibbonTab.
Here is a quick sample:
RibbonPanel ribbonPanel = application.CreatePanel("RibbonPanel");
ribbonPanel.CreatePushButton<Commands.Command>()
.SetLargeImage("Resources/Revit.ico");
Autodesk.Windows.RibbonPanel awRibbonPanel = ribbonPanel.GetRibbonPanel();
awRibbonPanel.Tab.Panels.Remove(awRibbonPanel);
Autodesk.Windows.RibbonTab awRibbonTab = Autodesk.Windows.ComponentManager.Ribbon.FindTab("Modify");
awRibbonTab.Panels.Add(awRibbonPanel);
To get/convert Autodesk.Revit.UI.RibbonPanel to Autodesk.Windows.RibbonPanel use this extension:
public static Autodesk.Windows.RibbonPanel GetRibbonPanel(this Autodesk.Revit.UI.RibbonPanel ribbonPanel)
{
var type = typeof(Autodesk.Revit.UI.RibbonPanel);
var _ribbonPanel = type.GetField("m_RibbonPanel",
System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic)
?.GetValue(ribbonPanel) as Autodesk.Windows.RibbonPanel;
return _ribbonPanel;
}
Or you could use my library ricaun.Revit.UI that have this and others extension to help create UI stuff in Revit.
RibbonPanel ribbonPanel = application.CreatePanel("RibbonPanel");
ribbonPanel.CreatePushButton<Commands.Command>()
.SetLargeImage("Resources/Revit.ico");
ribbonPanel.MoveToRibbonTab("Modify");
Be aware that Revit does not expect new panels in the modify tab, if you add to many panels in there weird things could happen in the UI.
If every single plugin add something in the Modify tab would be a mess, I always make the modify ribbon panel optional so the user can disable.