Invokes a general purpose two-click editor that lets the user to specify a rectangular area on the screen.

Namespace: Autodesk.Revit.UI.Selection
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 21.0.0.0 (21.1.1.109)

Syntax

C#
public PickedBox PickBox(
	PickBoxStyle style,
	string statusPrompt
)
Visual Basic
Public Function PickBox ( _
	style As PickBoxStyle, _
	statusPrompt As String _
) As PickedBox
Visual C++
public:
PickedBox^ PickBox(
	PickBoxStyle style, 
	String^ statusPrompt
)

Parameters

style
Type: Autodesk.Revit.UI.Selection..::..PickBoxStyle
Specifies the value that controls the style of the pick box.
statusPrompt
Type: System..::..String
The message shown on the status bar.

Return Value

The picked box that contains two XYZ points.

Remarks

The method starts an editor and returns when it finishes. Returns a PickedBox that contains two XYZ points.

Exceptions

ExceptionCondition
Autodesk.Revit.Exceptions..::..ArgumentOutOfRangeExceptionThrown when the style is not a recognized value.
Autodesk.Revit.Exceptions..::..ArgumentNullExceptionThrown when the argument statusPrompt is nullNothingnullptra null reference (Nothing in Visual Basic).
Autodesk.Revit.Exceptions..::..OperationCanceledExceptionThrown when the Revit user cancelled this operation. Thrown when the Revit user tried to switch the active view, close the active document or Revit application when responding to this mode.

See Also