Skip to content

CoordinateInput

Canonical path: NemAll_Python_IFW_Input.CoordinateInput

Bases: InputViewDocumentData

Base class implementation of the coordinate input

The CoordinateInput class is the base class for input classes which need access to coordinate input.

Each coordinate input has to be start with a call to a InitxxxInput(...) member function. This call initializes the coordinate input mode and shows the coordinate input dialog.

To get the current input point of a mouse position, the GetInputPoint(...) member has to be called. This call returns the resulting world point of the mouse position (free point, identification point, distance point to the start or identification point, ...)

Inside a member, where no mouse message is available, the current input point can be get by a call to GetCurrentPoint(...).

AddGeometryFromPreviewElements

AddGeometryFromPreviewElements(elements: list)

Add the geometry elements from the preview elements for the point and element search

Parameters:

  • elements (list) –

    Geometry elements

AllowSelectGeometryElement

AllowSelectGeometryElement(bSelectGeoElement: bool)

Allow to select an element

Parameters:

  • bSelectGeoElement (bool) –

    Select geometry element allowed: true/false

CancelHighlightGeoElement

CancelHighlightGeoElement()

Cancel geometry element highlight

CancelInput

CancelInput()

Explicit cancel of the input function

EnableChangeXYFocus

EnableChangeXYFocus(bChangeXYFocus: bool)

Enable the change of the x/y-focus after each input

Parameters:

  • bChangeXYFocus (bool) –

    if true, the xy focus will be changed

EnableCoordinateInput

EnableCoordinateInput(bEnable: bool)

Enable / disable the coordinate input

This function can be used to enable or disable the coordinate input.

  • disable: the coordinate input dialog is removed from the input toolbar
  • enable: the coordinate input dialog is shown in the input toolbar

Parameters:

  • bEnable (bool) –

    Enable the coordinate input: true/false

EnableUndoStep

EnableUndoStep(bEnableUndoStep: bool)

Enable disable the undo step

Parameters:

  • bEnableUndoStep (bool) –

    Enable the undo step: true/false

EnableZCoord

EnableZCoord(bEnable: bool)

Enable the z-coordinate inside the coordinate dialog

Parameters:

  • bEnable (bool) –

    Z coordinate inside the coordinate dialog is enabled: true/false

GetAssocViewFromPoint

GetAssocViewFromPoint(
    mouseMsg: int, pnt: Point2D, pMsgInfo: AddMsgInfo
) -> AssocViewElementAdapter

Get the associative view from the point

Parameters:

  • mouseMsg (int) –

    Mouse message WM_xxx

  • pnt (Point2D) –

    Cursor point (view coordinate)

  • pMsgInfo (AddMsgInfo) –

    Additional message info

Returns:

GetCurrentPoint overloaded

GetCurrentPoint() -> CoordinateInputResult

Get and mark the current input point

Returns:

GetCurrentPoint(startPnt: Point3D) -> CoordinateInputResult

Get and mark the current input point

Parameters:

  • startPnt (Point3D) –

    Starting point End point input is possible by a distance input to the start point

Returns:

GetCurrentPoint(startPnt: Point3D, bStartPnt: bool) -> CoordinateInputResult

Get and mark the current input point

Parameters:

  • startPnt (Point3D) –

    Starting point

  • bStartPnt (bool) –

    Starting point is active End point input is possible by a distance input to the start point

Returns:

GetCurrentPoint(bStartPnt: bool) -> CoordinateInputResult

Get and mark the current input point

Parameters:

  • bStartPnt (bool) –

    Starting point is active true/false. End point input is possible by a distance input to the input point of the last input step

Returns:

GetInputAssocView

GetInputAssocView() -> AssocViewElementAdapter

Get the associative view of the input point / element

The function can be used after a call to GetInputPoint, SelectGeometryElement, SelectElement, ...

Returns:

GetInputControlIntValue

GetInputControlIntValue() -> int

Get the integer value from the value input control

Returns:

  • int

    Integer value from the value input control

GetInputControlText

GetInputControlText() -> object

Get the text from the text input control

Returns:

  • object

    Text from the text input control

GetInputControlValue

GetInputControlValue() -> float

Get the double value from the value input control

Returns:

  • float

    Double value from the value input control

GetInputPoint overloaded

GetInputPoint(
    mouseMsg: int, pnt: Point2D, pMsgInfo: AddMsgInfo
) -> CoordinateInputResult

Perform a point identification inside the viewport

Parameters:

  • mouseMsg (int) –

    Mouse message

  • pnt (Point2D) –

    Cursor point (view coordinate)

  • pMsgInfo (AddMsgInfo) –

    Additional message info

Returns:

GetInputPoint(
    mouseMsg: int, pnt: Point2D, pMsgInfo: AddMsgInfo, bStartPnt: bool
) -> CoordinateInputResult

Perform a point identification inside the viewport

Parameters:

  • mouseMsg (int) –

    Mouse message

  • pnt (Point2D) –

    Cursor point (view coordinate)

  • pMsgInfo (AddMsgInfo) –

    Additional message info

  • bStartPnt (bool) –

    When set to true, the point can be input in relation to the point from the previous input (assuming a point tracking is activated in Allplan UI)

Returns:

GetInputPoint(
    mouseMsg: int,
    pnt: Point2D,
    pMsgInfo: AddMsgInfo,
    startPnt: Point3D,
    bStartPnt: bool,
) -> CoordinateInputResult

Perform a point identification inside the viewport

Parameters:

  • mouseMsg (int) –

    Mouse message

  • pnt (Point2D) –

    Cursor point (view coordinate)

  • pMsgInfo (AddMsgInfo) –

    Additional message info

  • startPnt (Point3D) –

    Starting point

  • bStartPnt (bool) –

    When set to true, the point can be input in relation to the point defined in startPoint (assuming a point tracking is activated in Allplan UI)

Returns:

GetReferenceLine

GetReferenceLine() -> Line2D

Get the reference line, on which the identified point is located.

This method works when eIdentificationMode is set to eIDENT_ARCH... and only with on architectural elements

Returns:

GetSelectedElement

GetSelectedElement() -> BaseElementAdapter

Get the selected element

The function can be used in case of eIdentMode = MODE_TEXTPOINT, SelectGeometryElement, SelectElement, ...

Returns:

GetSelectedElementAssocView

GetSelectedElementAssocView() -> AssocViewElementAdapter

Get the related associative view of the selected element

Returns:

GetSelectedElements

GetSelectedElements() -> BaseElementAdapterList

Get the selected elements

The function can be used in case of eIdentMode = MODE_TEXTPOINT, SelectGeometryElement, SelectElement, ...

Returns:

GetSelectedGeometryElement

GetSelectedGeometryElement() -> Any

Get the selected geometry element

Returns:

  • Any

    IGeometry element of the selected geometry element (0 = no selection)

GetSelectedGeometryElements

GetSelectedGeometryElements() -> list[Any]

Get the selected geometry element

Returns:

  • list[Any]

    IGeometry elements of the selected geometry elements (with the same distance)

InitFirstElementInput

InitFirstElementInput(
    text: InputStringConvert,
    identMode: CoordinateInputMode = CoordinateInputMode(),
)

Initialize the input for an element selection (point, line, ...) as free point input:

  • only a short prompt is shown in the dialog line
  • the input is allowed in each of the currently opened documents

Parameters:

InitFirstElementValueInput

InitFirstElementValueInput(
    text: InputStringConvert,
    ctrlData: ValueInputControlData,
    identMode: CoordinateInputMode = CoordinateInputMode(),
)

Initialize the input for an element selection (point, line, ...) as free point input:

  • beside the prompt, also an input control is shown in the dialog line
  • the input is allowed in each of the currently opened documents

Parameters:

InitFirstPointInput

InitFirstPointInput(
    text: InputStringConvert,
    identMode: CoordinateInputMode = CoordinateInputMode(),
    inputViewData: InputViewData = InputViewData(),
)

Initialize the input of a point:

  • the prompt and standard coordinate input controls are shown in the dialog line
  • the input is allowed in each of the currently opened documents

Parameters:

InitFirstPointValueInput

InitFirstPointValueInput(
    text: InputStringConvert,
    ctrlData: ValueInputControlData,
    identMode: CoordinateInputMode = CoordinateInputMode(),
    inputViewData: InputViewData = InputViewData(),
)

Initialize the input of a point:

  • additionally to the prompt and standard coordinate input controls, also an extra input control is shown in the dialog line
  • the input is allowed in each of the currently opened documents

Parameters:

InitNextElementInput

InitNextElementInput(
    text: InputStringConvert,
    identMode: CoordinateInputMode = CoordinateInputMode(),
)

Initialize the input for an element selection (point, line, ...) as free point input.

  • only a short prompt is shown in the dialog line
  • the input is allowed only in the document, where the first input was done
Remarks

Initialize this input after the input started with InitFirst...Input is completed

Parameters:

InitNextElementValueInput

InitNextElementValueInput(
    text: InputStringConvert,
    ctrlData: ValueInputControlData,
    identMode: CoordinateInputMode = CoordinateInputMode(),
)

Initialize the input for an element selection (point, line, ...) as free point input:

  • beside the prompt, also an input control is shown in the dialog line
  • the input is allowed only in the document, where the first input was done
Remarks

Initialize this input after the input started with InitFirst...Input is completed

Parameters:

InitNextPointInput

InitNextPointInput(
    text: InputStringConvert,
    identMode: CoordinateInputMode = CoordinateInputMode(),
)

Initialize the input of a point:

  • the prompt and standard coordinate input controls are shown in the dialog line
  • the input is allowed only in the document, where the first input was done
Remarks

Initialize this input after the input started with InitFirst...Input is completed

Parameters:

InitNextPointValueInput

InitNextPointValueInput(
    text: InputStringConvert,
    ctrlData: ValueInputControlData,
    identMode: CoordinateInputMode = CoordinateInputMode(),
)

Initialize the input of a point:

  • additionally to the prompt and standard coordinate input controls, also an extra input control is shown in the dialog line
  • the input is allowed only in the document, where the first input was done
Remarks

Initialize this input after the input started with InitFirst...Input is completed

Parameters:

InitValueInput

InitValueInput(text: InputStringConvert, ctrlData: ValueInputControlData)

Initialize the value input

  • the prompt and an input control is shown in the dialog line
  • no point input or element selection is allowed in any of the currently opened documents
Remarks

Initialize this input after the input started with InitFirst...Input is completed

Parameters:

IsCoordinateInputEnabled

IsCoordinateInputEnabled() -> bool

Check, whether the input controls are active (enabled)

Returns:

  • bool

    Coordinate input is active: true/false

IsEmptyValueInputControl

IsEmptyValueInputControl() -> bool

Check, whether there is no input inside the input control

Returns:

  • bool

    Input control is empty: true/false

IsIdentElementAllowed

IsIdentElementAllowed(bAllowCenter: bool) -> bool

Check, whether the result of the point identification allows an element identification

Parameters:

  • bAllowCenter (bool) –

    Allow element identification by center point

Returns:

  • bool

    Element identification allowed: true false

IsIdentModeOriginal

IsIdentModeOriginal() -> bool

Check, whether the current identification mode is the original mode

Returns:

  • bool

    Current identification mode is the original mode

IsIdentModePointWallPoint

IsIdentModePointWallPoint() -> bool

Check, whether the identification mode is point and wall point

Returns:

  • bool

    Identification mode is point and wall point: true false

IsIdentModeWallPoint

IsIdentModeWallPoint() -> bool

Check, whether the identification mode is wall point

Returns:

  • bool

    Identification mode is wall point: true false

IsIdentPoint

IsIdentPoint() -> bool

Get the identification state of the current point

Returns:

  • bool

    Identification point: true false

IsMouseLeave

IsMouseLeave() -> bool

Check, whether the mouse is outside the view

Returns:

  • bool

    Mouse is outside the view: true/false

IsMouseMove

IsMouseMove(mouseMsg: int) -> bool

Check on mouse move

Parameters:

  • mouseMsg (int) –

    Mouse message WM_xxx

Returns:

  • bool

    Mouse move: true false

IsSelectedGeometryElement

IsSelectedGeometryElement() -> bool

Get the state of the selected geometry element

Returns:

  • bool

    Geometry element is selected: true/false

IsValueInputControl overloaded

IsValueInputControl(id: int) -> bool

Check, whether the ID belongs to the value input control (from the coordinate input dialog)

Parameters:

  • id (int) –

    ID to check

Returns:

  • bool

    ID belongs to the value input control (from the coordinate input dialog): true/false

IsValueInputControl() -> bool

Check, whether a value input control exists

Returns:

  • bool

    A value input control exists: true/false

IsValueInputControlInput

IsValueInputControlInput(bIdentPoint: bool) -> bool

Check, whether an input inside the value input control is done and the value should be used

Parameters:

  • bIdentPoint (bool) –

    Identification point has higher priority: true/false

Returns:

  • bool

    Check, whether the input value inside the added control

ProcessMouseMsg

ProcessMouseMsg(mouseMsg: int, pnt: Point2D, pMsgInfo: AddMsgInfo) -> object

Process a mouse message

Parameters:

  • mouseMsg (int) –

    Mouse message WM_xxx

  • pnt (Point2D) –

    Cursor point (view coordinate)

  • pMsgInfo (AddMsgInfo) –

    Additional message info

Returns:

  • object

    Standard return

SelectElement overloaded

SelectElement(
    mouseMsg: int,
    pnt: Point2D,
    pMsgInfo: AddMsgInfo,
    bHighlight: bool,
    bSelAlways: bool,
    bAllowCenter: bool,
) -> bool

Perform element search

Uses the filter set by the SetElementFilter

Parameters:

  • mouseMsg (int) –

    Mouse message

  • pnt (Point2D) –

    Cursor point (view coordinate)

  • pMsgInfo (AddMsgInfo) –

    Additional message info

  • bHighlight (bool) –

    Highlight the selected element

  • bSelAlways (bool) –

    Relevant when used in combination with GetInputPoint method. When set to False, the element search is terminated after the method GetInputPoint found a start/end/mid point of an element. When set to True, the element search will be performed anyway.

  • bAllowCenter (bool) –

    Relevant when used in combination with GetInputPoint method. When bSelAlways is set to False and this option to True, the element search is performed after the method GetInputPoint found a mid point. When bSelAlways is set to True, this option becomes irrelevant.

Returns:

  • bool

    True, when element is selected. False otherwise

SelectElement(
    mouseMsg: int,
    pnt: Point2D,
    pMsgInfo: AddMsgInfo,
    bHighlight: bool,
    bSelAlways: bool,
    bAllowCenter: bool,
    selectSetting: ElementSelectFilterSetting,
) -> bool

Select an element if no identification point exists.

Parameters:

  • mouseMsg (int) –

    Mouse message

  • pnt (Point2D) –

    Cursor point (view coordinate)

  • pMsgInfo (AddMsgInfo) –

    Additional message info

  • bHighlight (bool) –

    Highlight the selected element

  • bSelAlways (bool) –

    Relevant when used in combination with GetInputPoint method. When set to False, the element search is terminated after the method GetInputPoint found a start/end/mid point of an element. When set to True, the element search will be performed anyway.

  • bAllowCenter (bool) –

    Relevant when used in combination with GetInputPoint method. When bSelAlways is set to False and this option to True, the element search is performed after the method GetInputPoint found a mid point. When bSelAlways is set to True, this option becomes irrelevant.

  • selectSetting (ElementSelectFilterSetting) –

    Element selection filter

Returns:

  • bool

    True, when element is selected. False otherwise

SelectGeometryElement

SelectGeometryElement(
    mouseMsg: int,
    pnt: Point2D,
    pMsgInfo: AddMsgInfo,
    bHighlightCompleteElement: bool = False,
) -> bool

Select a base geometry element. Use the filter set by SetGeometryElementFilter and SetGeometryFilter

Parameters:

  • mouseMsg (int) –

    Mouse message WM_xxx

  • pnt (Point2D) –

    Cursor point (view coordinate)

  • pMsgInfo (AddMsgInfo) –

    Additional message info

  • bHighlightCompleteElement (bool, default: False ) –

    true = highlight the complete element, false = highlight only the selected geometry part

Returns:

  • bool

    Element was found: true false

SelectPolyhedronFace

SelectPolyhedronFace(
    arg2: BaseElementAdapter, arg3: Point2D, arg4: bool
) -> tuple

.. deprecated:: since Allplan 2023-1-0 use FaceSelectService::SelectPolyhedronFace

SelectWallFace

SelectWallFace(arg2: BaseElementAdapter, arg3: Point2D, arg4: bool) -> tuple

.. deprecated:: since Allplan 2023-1-0 use FaceSelectService::SelectWallFace

SelectWallFaceInUVS

SelectWallFaceInUVS(
    arg2: BaseElementAdapter, arg3: Point2D, arg4: bool
) -> tuple

.. deprecated:: since Allplan 2023-1-0 use FaceSelectService::SelectWallFaceInUVS

SetAbscissaElement

SetAbscissaElement(abscissa: object, abscissaAssoMat: Matrix3D)

Set the abscissa element

Parameters:

  • abscissa (object) –

    Abscissa

  • abscissaAssoMat (Matrix3D) –

    Abscissa matrix of the associative view

SetElementFilter

SetElementFilter(selectSetting: ElementSelectFilterSetting)

Set the element selection filter

Parameters:

SetGeometryElementFilter

SetGeometryElementFilter(selectSetting: ElementSelectFilterSetting)

Set the geometry element selection filter

Parameters:

SetGeometryFilter

SetGeometryFilter(geoFilter: SnoopElementGeometryFilter)

Set the geometry filter used for geometry search during point input (initialized with InitFirstPointInput or InitNextPointInput).

This filter is used, when the identification mode (eIdentificationMode) is set to identify points and geometry elements, i.e. to eIDENT_POINT_ELEMENT...

Parameters:

  • selectSetting

    Geometry element selection filter

SetInputPlane

SetInputPlane(plane: Plane3D)

Set the input plane.

The input point will be projected onto this plane along the plane's normal vector.

Parameters:

SetInputText

SetInputText(text: InputStringConvert)

Set the input text

Parameters:

SetInputTextPrefix

SetInputTextPrefix(iDPrefix: int)

Set the input text prefix

Parameters:

  • iDPrefix (int) –

    ID of the prefix text

SetProjectionBase0

SetProjectionBase0(setProjectionBase0: bool)

Set the projection base to 0 during point input in floor plan view or side view

When this option is set to True, then if a point is found and snapped during the input inside a floor plan view or a side view (front, rear, left or right), the resulting point will be projected on:

  • the XY plane in case of floor plan view
  • the XZ plane in case of front or rear view
  • the YZ plane in case of left ir right view

When this option is set to False, then the resulting point is not projected onto those planes. Instead it is being snapped to the first visible point from the observer's perspective.

Default value is: False

Parameters:

  • setProjectionBase0 (bool) –

    True, to set the projection base to 0

__init__

__init__(bZCoord: bool = True)

Constructor

Parameters:

  • bZCoord (bool, default: True ) –

    Z coordinate input is active: true/false

Placeholder