Revit 2026 API
Ribbon |
Adds a Ribbon item to the panel.
Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public RibbonItem AddItem( RibbonItemData itemData )
Public Function AddItem ( itemData As RibbonItemData ) As RibbonItem
public: RibbonItem^ AddItem( RibbonItemData^ itemData )
member AddItem : itemData : RibbonItemData -> RibbonItem
Parameters
- itemData RibbonItemData
- Data containing information about the new item.
Return Value
RibbonItemThe added Ribbon item.
| Exception | Condition |
|---|---|
| ArgumentNullException | Thrown when itemData is . |
| ArgumentException | Thrown when an item with the itemData.Name already exists in the panel or the data is not of the correct type. |
The new item may either be a PushButton, PulldownButton, SplitButon, RadioButtonGroup, ComboBox, or TextBox depending upon the type of data passed in.
The new item may be created as a large-size vertical control in the panel.
See Also