Skip to content

HandleModificationService

Implementation of the handle modification service.

The service can be used inside an Interactor-PythonPart for executing the modification by handles

HandleModificationService

Canonical path: HandleModificationService.HandleModificationService

Implementation of the handle modification service

handle_prop property

handle_prop: HandleProperties | None

get the handle property

Returns:

__init__

__init__(
    coord_input: CoordinateInput,
    build_ele_list: list[BuildingElement],
    control_props_list: list[BuildingElementControlProperties],
    asso_ref_ele: BaseElementAdapter | None = None,
    use_system_angle: bool = True,
)

initialize

Parameters:

  • coord_input (CoordinateInput) –

    API object for the coordinate input, element selection, ... in the Allplan view

  • build_ele_list (list[BuildingElement]) –

    list with the building elements

  • control_props_list (list[BuildingElementControlProperties]) –

    list with the control properties

  • asso_ref_ele (BaseElementAdapter | None, default: None ) –

    reference element of the associative view

  • use_system_angle (bool, default: True ) –

    use system angle state

get_local_handle_point

get_local_handle_point(input_pnt: Point3D) -> Point3D | None

get the local handle point

Parameters:

  • input_pnt (Point3D) –

    new handle point

Returns:

  • Point3D | None

    handle point in the local element coordinate system, None if not exist

is_handle_draw_lock staticmethod

is_handle_draw_lock() -> bool

get the handle draw lock state

Returns:

  • bool

    handle draw lock state

new_handle_point_input

new_handle_point_input(mouse_msg: int, pnt: Point2D, msg_info: Any) -> Point3D

Input the new handle point

Parameters:

  • mouse_msg (int) –

    mouse message ID

  • pnt (Point2D) –

    input point in Allplan view coordinates

  • msg_info (Any) –

    additional mouse message info

Returns:

process_mouse_msg

process_mouse_msg(mouse_msg: int, pnt: Point2D, msg_info: Any) -> bool

Handles the process mouse message event

Parameters:

  • mouse_msg (int) –

    mouse message ID

  • pnt (Point2D) –

    input point in Allplan view coordinates

  • msg_info (Any) –

    additional mouse message info

Returns:

  • bool

    True/False for success.

reset_value

reset_value()

reset the handle value

set_handle_draw_lock staticmethod

set_handle_draw_lock(handle_draw_lock: bool)

set the handle draw lock state

Parameters:

  • handle_draw_lock (bool) –

    handle draw lock state

start

start(
    handle_list: list[HandleProperties],
    placement_mat: Matrix3D,
    input_doc: DocumentAdapter,
    view_world_proj: ViewWorldProjection,
    create_view_input_controls: bool,
)

start the handle modification

Parameters:

  • handle_list (list[HandleProperties]) –

    list with the handles

  • placement_mat (Matrix3D) –

    placement matrix of the PythonPart

  • input_doc (DocumentAdapter) –

    input document

  • view_world_proj (ViewWorldProjection) –

    view world projection

  • create_view_input_controls (bool) –

    create the input controls in the view

start_new_handle_point_input

start_new_handle_point_input(
    str_table_service: StringTableService,
    handle_placement_geo: list[Any] | None = None,
)

start the new handle point input

Parameters:

  • str_table_service (StringTableService) –

    string table service

  • handle_placement_geo (list[Any] | None, default: None ) –

    additional geometry element for the point input (hidden elements, preview elements)

stop

stop()

stop the handle modification

Placeholder