CanExecute Event


Occurs when the command associated with this AddInCommandBinding initiates a check to determine whether the command can be executed on the command target.

Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2013

Syntax

C#
public event EventHandler<CanExecuteEventArgs> CanExecute
Visual Basic
Public Event CanExecute As EventHandler(Of CanExecuteEventArgs)
Visual C++
public:
 event EventHandler<CanExecuteEventArgs^>^ CanExecute {
	void add (EventHandler<CanExecuteEventArgs^>^ value);
	void remove (EventHandler<CanExecuteEventArgs^>^ value);
}

Remarks

This callback will be called by Revit's user interface any time there is a contextual change. Therefore, the callback must be fast and is not permitted to be blocking in any way.

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →