Cancel Property


Indicates whether the event is being cancelled. When the event is cancellable, set the property to True to cancel it.

Namespace: Autodesk.Revit.DB.Events
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)

Syntax

C#
public virtual bool Cancel { get; set; }
Visual Basic
Public Overridable Property Cancel As Boolean
	Get
	Set
Visual C++
public:
virtual property bool Cancel {
	bool get ();
	void set (bool value);
}

Remarks

If an event delegate wishes to cancel the event, it should set the value of this property to True. Not every event is cancellable. Whether or not an event may be cancelled is indicated by the value of 'Cancellable' property.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions InvalidOperationException Thrown if an event delegate attempts to cancel a non-cancellable event.

See Also