AddItem Method


Adds a new ToggleButton to the RadioButtonGroup.

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

Syntax

C#
public ToggleButton AddItem(
	ToggleButtonData buttonData
)
Visual Basic
Public Function AddItem ( _
	buttonData As ToggleButtonData _
) As ToggleButton
Visual C++
public:
ToggleButton^ AddItem(
	ToggleButtonData^ buttonData
)

Parameters

buttonData
Type: Autodesk.Revit.UIToggleButtonData
An object containing the data needed to construct the ToggleButton.

Return Value

The newly added ToggleButton.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullExceptionThrown when buttonData is a null reference (Nothing in Visual Basic).
Autodesk.Revit.ExceptionsArgumentException Thrown when button with buttonData.Name already exists in the group.

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 →