MultiElementSelectInteractor
Canonical path: ScriptObjectInteractors.MultiElementSelectInteractor.MultiElementSelectInteractor
Bases: BaseScriptObjectInteractor
Implementation of the interactor for selecting multiple elements
This interactor prompts the user to select one or more elements using Allplan native element selection functionality.
__del__
Default destructor
Remove the selection function from the stack, if it is running.
__init__
__init__(
interactor_result: MultiElementSelectInteractorResult,
ele_filter: list[GUID] | BaseFilterObject | SelectionQuery | None = None,
prompt_msg: str = "Select the elements",
active_elements: bool = True,
)
Initialize the multiple element selection interactor
Parameters:
-
interactor_result
(MultiElementSelectInteractorResult
) –object, where to save the selection results to
-
ele_filter
(list[GUID] | BaseFilterObject | SelectionQuery | None
, default:None
) –element filter as a list of accepted element type GUIDs or a callable or a selection query returning True, when the element is valid for selection
-
prompt_msg
(str
, default:'Select the elements'
) –prompt message shown to the user in the dialog line
-
active_elements
(bool
, default:True
) –When set to True, only elements on active layers and drawing files can be selected. When set to False, elements on both active and passive layers and drawing files can be selected.
process_mouse_msg
process_mouse_msg(
_mouse_msg: int, _pnt: Point2D, _msg_info: AddMsgInfo
) -> bool
Handles the process mouse message event
Parameters:
-
_mouse_msg
(int
) –mouse message ID
-
_pnt
(Point2D
) –input point in Allplan view coordinates
-
_msg_info
(AddMsgInfo
) –additional mouse message info
Returns:
-
bool
–True/False for success.
start_input
start_input(coord_input: CoordinateInput)
Start the multiple element selection
Parameters:
-
coord_input
(CoordinateInput
) –API object for the coordinate input, element selection, ... in the Allplan view