Revit 2024 API |
RevitEventArgs..::..Cancel Property |
RevitEventArgs Class See Also |
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: 24.0.0.0 (24.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. |