Revit 2026 API
Pulldown |
Adds a new pushbutton to the pulldown button and associates it with an ExternalCommand.
Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public PushButton AddPushButton( PushButtonData buttonData )
Public Function AddPushButton ( buttonData As PushButtonData ) As PushButton
public: PushButton^ AddPushButton( PushButtonData^ buttonData )
member AddPushButton : buttonData : PushButtonData -> PushButton
Parameters
- buttonData PushButtonData
- An object containing the data needed to construct the pushbutton.
Return Value
PushButtonThe newly added pushbutton.
| Exception | Condition |
|---|---|
| ArgumentNullException | Thrown when buttonData is . |
| ArgumentException | Thrown when button with buttonData.Name already exists in the button. |
The new button will display its large image if PushButton.LargeImage is set.
See Also