AddItem Method


Adds a new item to the ComboBox.

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

Syntax

C#
public ComboBoxMember AddItem(
	ComboBoxMemberData memberData
)
Visual Basic
Public Function AddItem ( _
	memberData As ComboBoxMemberData _
) As ComboBoxMember
Visual C++
public:
ComboBoxMember^ AddItem(
	ComboBoxMemberData^ memberData
)

Parameters

memberData
Type: Autodesk.Revit.UIComboBoxMemberData
An object containing the data needed to construct the ComboBoxMember.

Return Value

The newly added ComboBoxMember.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullExceptionThrown when memberData is a null reference (Nothing in Visual Basic).
Autodesk.Revit.ExceptionsArgumentException Thrown when button with memberData.Name already exists in the drop-down list.

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 →