© 2010 Autodesk
Introduction to Revit 2011 API
Ribbon API
What’s new in 2011
§New namespace
§ Autodesk.Revit.UI
§
§New Widgets (SplitButton, ComboBox, TextBox, etc)
§New events for ComboBox and TextBox
§
§New properties
§RibbonItem.Visible
§RibbonItem.LongDescription
§RibbonItem.ToolTipImage
§PushButton.AvailabilityClassName
§
§Some pre-existing APIs changed (AddButtons -> AddItems, etc)
§
§
§
There are new Ribbon components supported via the Ribbon API:
SplitButton - a pulldown button with a default pushbutton attached
RadioGroup - a set of ToggleButtons, where only one of the set can be active at a time
ComboBox - a pulldown containing a set of selectable items, which can be grouped optionally
TextBox - an input field for users to enter text
SlideOut panel - an extra panel can optionally slide down from a Ribbon panel; this panel can contain any of the standard Ribbon components
For ComboBox and TextBox, events are included; these events call your API code when the component is changed by the user.

The new property:
RibbonItem.Visible  : provides control over whether a particular item is visible.
RibbonItem.LongDescription
RibbonItem.ToolTipImage : allow you to set up an extended tooltip for the Ribbon item.  This tooltip can display a longer set of text, and/or a single image.
PushButton.AvailabilityClassName  : allows assignment of an availability class to controlled whether or not the button is available, similar to the option provided for ExternalCommands registered by manifest.

There is also a new option to add custom panels to the Analyze tab in Revit as well as the Add-Ins tab, via a new enumeration overload of Application.CreateRibbonPanel().
As a result of these enhancements, some pre-existing APIs have changed:
RibbonPanel.AddButton() has been replaced with RibbonPanel.AddItem()
RibbonPanel.AddStackedButtons() overloads have been replaced with RibbonPanel.AddStackedItems() overloads
Property RibbonPanel.Items has been replaced with method RibbonPanel.GetItems()
Property PulldownButton.Items has been replaced with method PulldownButton.GetItems()
Methods RibbonPanel.AddPushButton() and RibbonPanel.AddPulldownButton() have been removed. Use RibbonPanel.AddItem() for this operation.
RibbonPanel.AddToPulldown() has been removed. Use PulldownButton.AddItem() for this operation.
PulldownButton.AddPushButton() has been removed. Use PulldownButton.AddItem() for this operation.