AddItem Method


Adds a Ribbon item to the panel.

Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2011

Syntax

C#
public RibbonItem AddItem(
	RibbonItemData itemData
)
Visual Basic
Public Function AddItem ( _
	itemData As RibbonItemData _
) As RibbonItem
Visual C++
public:
RibbonItem^ AddItem(
	RibbonItemData^ itemData
)

Parameters

itemData
Type: Autodesk.Revit.UIRibbonItemData
Data containing information about the new item.

Return Value

The added Ribbon item.

Remarks

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.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullExceptionThrown when itemData is a null reference (Nothing in Visual Basic).
Autodesk.Revit.ExceptionsArgumentExceptionThrown when an item with the itemData.Name already exists in the panel or the data is not of the correct type.

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →