Skip to content

PythonPartTestUtil

Implementation of the test utilities for the nodes

PythonPartTestUtil

Canonical path: TestHelper.PythonPartTestUtil.PythonPartTestUtil

Implementation of the test utilities for the nodes

create_interactor staticmethod

create_interactor(
    doc: DocumentAdapter,
    example_name: str,
    input_data: Optional[List[Any]] = None,
    print_script_name: bool = True,
) -> Tuple[
    Optional[object],
    PythonWpfPalette,
    List[BuildingElement],
    CoordinateInputMock,
]

Read the example

input_data: AllplanGeo.Point3D(...)
            "CancelInput"
            "Cancel"

Parameters:

  • doc (DocumentAdapter) –

    document of the Allplan drawing files

  • example_name (str) –

    name of the example

  • input_data (Optional[List[Any]], default: None ) –

    input data

  • print_script_name (bool, default: True ) –

    print script name state

Returns:

  • Tuple[Optional[object], PythonWpfPalette, List[BuildingElement], CoordinateInputMock]

    tuple(created interactor, palette, list with the building elements, coordinate input)

start_script staticmethod

start_script(
    doc: DocumentAdapter,
    example_name: str,
    print_script_name: bool = True,
    parameter_list: Optional[List[Any]] = None,
    modify_uuid_list: Optional[List[str]] = None,
) -> Tuple[
    Optional[Any], List[BuildingElement], CoordinateInputMock, PythonWpfPalette
]

Start the example script

Parameters:

  • doc (DocumentAdapter) –

    document of the Allplan drawing files

  • example_name (str) –

    name of the example

  • print_script_name (bool, default: True ) –

    print the script name in the trace output state

  • parameter_list (Optional[List[Any]], default: None ) –

    list with the interactor parameters

  • modify_uuid_list (Optional[List[str]], default: None ) –

    list with the UUIDs of the modified elements

Returns:

  • Tuple[Optional[Any], List[BuildingElement], CoordinateInputMock, PythonWpfPalette]

    tuple(created interactor, list with the building elements, coordinate input, palette)