ToggleButtonData Constructor (String, String, String, String)


Constructs a new instance of ToggleButtonData, where the ToggleButton will execute an ExternalCommand when clicked.

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

Syntax

C#
public ToggleButtonData(
	string name,
	string text,
	string assemblyName,
	string className
)
Visual Basic
Public Sub New ( _
	name As String, _
	text As String, _
	assemblyName As String, _
	className As String _
)
Visual C++
public:
ToggleButtonData(
	String^ name, 
	String^ text, 
	String^ assemblyName, 
	String^ className
)

Parameters

name
Type: SystemString
The internal name of the new button.
text
Type: SystemString
The user visible text seen on the new button.
assemblyName
Type: SystemString
The assembly path of the button.
className
Type: SystemString
The name of the class containing the implementation for the command.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullExceptionThrown when a null reference (Nothing in Visual Basic) is passed for one or more arguments.
Autodesk.Revit.ExceptionsArgumentExceptionThrown when an empty string is passed for one or more arguments.

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 →