MLightCAD
    Preparing search index...

    Advanced input handler for CAD operations providing high-level user interaction methods.

    This class serves as a wrapper for all types of user input including:

    • Point input (mouse clicks, coordinates)
    • Entity selection (single or multiple entities)
    • String, number, angle, and distance input
    • Cursor management and visual feedback

    The editor abstracts away low-level mouse and keyboard events, providing a clean API for command implementations. Instead of listening to raw DOM events, commands should use the methods provided by this class.

    // Get user input for a point
    const point = await editor.getPoint();
    console.log('User clicked at:', point);

    // Get entity selection
    const selection = await editor.getSelection();
    console.log('Selected entities:', selection.ids);

    // Change cursor appearance
    editor.setCursor(AcEdCorsorType.Crosshair);
    Index

    Constructors

    Properties

    The view this editor is associated with

    events: {
        commandEnded: AcCmEventManager<AcEdCommandEventArgs>;
        commandWillStart: AcCmEventManager<AcEdCommandEventArgs>;
        sysVarChanged: AcCmEventManager<AcDbSysVarEventArgs>;
    } = ...

    Editor events

    Type Declaration

    • commandEnded: AcCmEventManager<AcEdCommandEventArgs>

      Fired after the command finishes executing

    • commandWillStart: AcCmEventManager<AcEdCommandEventArgs>

      Fired just before the command starts executing

    • sysVarChanged: AcCmEventManager<AcDbSysVarEventArgs>

      Fired after a system variable is changed directly through the SETVAR command or by entering the variable name at the command line.

    Accessors

    Methods

    • Prompts the user to input a point by clicking on the view or inputting one coordinate value.

      This method returns a promise that resolves after the user clicks on the view or inputs one valid coordinate value, providing the world coordinates of the click point.

      Parameters

      Returns Promise<AcGeVector3dLike>

      Promise that resolves to the input point coordinates