Skip to content

InputFunctionStarter

Canonical path: NemAll_Python_IFW_Input.InputFunctionStarter

Utility with methods to start and terminate multiple element selection (selection with a rectangle)

Methods:

  • RemoveFunction

    Remove the current input function from the input function stack. This method can be called only, if there is a selection function in the input function stack (started by calling e.g. StartElementSelect)

  • StartElementSelect

    Start the multiple element selection. In this mode elements can be selected in the viewport by

RemoveFunction staticmethod

RemoveFunction()

Remove the current input function from the input function stack. This method can be called only, if there is a selection function in the input function stack (started by calling e.g. StartElementSelect)

StartElementSelect staticmethod

StartElementSelect(
    text: str,
    selectSetting: ElementSelectFilterSetting,
    postSel: PostElementSelection,
    markSelectedElements: bool,
    selectionMode: SelectionMode = eSelectGeometry,
)

Start the multiple element selection. In this mode elements can be selected in the viewport by a selection rectangle or polygonal fence. The user can also point out individual elements by activating a bracket (right-click before and after selection)

The element selection overloads the process_mouse_msg, which means that this event is not called until the selection is completed. This is the case, when at least one of the following applies:

  • one or more elements were selected
  • selection rectangle was drawn in the viewport (regardless if any elements were selected)

After that, the result is saved in the PostElementSelection object and the function is removed from the function stack.

IMPORTANT: There can only be one selection function in the input function stack! If the running element selection must be restarted, call RemoveFunction first!

Parameters:

  • text (str) –

    Prompt message shown to the user in the Allplan dialog line

  • selectSetting (ElementSelectFilterSetting) –

    Filter setting

  • postSel (PostElementSelection) –

    Object to store the result of the selection. The result will be saved after a successful selection (see cases above)

  • markSelectedElements (bool) –

    Whether to mark the selected elements

  • selectionMode (SelectionMode, default: eSelectGeometry ) –

    Selection mode