CanExecute Method


Implement this method to inform Revit whether the drop event can be executed onto the given view.

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

Syntax

C#
bool CanExecute(
	UIDocument document,
	Object data,
	ElementId dropViewId
)
Visual Basic
Function CanExecute ( _
	document As UIDocument, _
	data As Object, _
	dropViewId As ElementId _
) As Boolean
Visual C++
bool CanExecute(
	UIDocument^ document, 
	Object^ data, 
	ElementId^ dropViewId
)

Parameters

document
Type: Autodesk.Revit.UI UIDocument
The document on which the data was dropped.
data
Type: System Object
The data.
dropViewId
Type: Autodesk.Revit.DB ElementId
The view upon which the user will drop.

Return Value

Return true to activate the target view and execute the drop. Return false to cancel the activation and the drop execution.

Remarks

Document modifications are not permitted from this callback.

See Also