MotorXP-AFM Scripting API
    Preparing search index...

    Interface Console

    interface Console {
        clear(scope: number, suppressInfoMessage: boolean): void;
        debug(...data: any[]): void;
        dir(obj: any): void;
        error(...data: any[]): void;
        info(...data: any[]): void;
        log(...data: any[]): void;
        print(text: string): void;
        warn(...data: any[]): void;
    }
    Index
    • Clears console output for the specified scope. In C++, this is a signal with two required arguments: calling console.clear() without arguments fails.

      Parameters

      • scope: number

        Console scope: 1 — Service, 2 — Motor, 4 — Stator, 8 — Rotor, 16 — Winding, 32 — Mesh, 64 — Analysis, 127 — all.

      • suppressInfoMessage: boolean

        True to suppress the message about clearing the console.

      Returns void

      No return value.

    • console.debug() prints a highlighted message in purple. Use it for debugging and highlighting important messages. Multiple arguments can be displayed on one line.

      Parameters

      • ...data: any[]

        Messages to print.

      Returns void

      No return value.

    • console.dir() displays the properties and methods of a JavaScript object as a list, making it easier to inspect its structure and nested properties.

      Parameters

      • obj: any

        JavaScript object.

      Returns void

      No return value.

    • console.error() prints an error message in red with an error icon. Use it for critical issues requiring immediate attention. Multiple arguments can be displayed on one line.

      Parameters

      • ...data: any[]

        Messages to print.

      Returns void

      No return value.

    • console.info() prints an informational message in green with an info icon. It is similar to console.log(), but intended for informational output. Multiple arguments can be displayed on one line.

      Parameters

      • ...data: any[]

        Messages to print.

      Returns void

      No return value.

    • console.log() prints a message in gray with a bug icon. Multiple arguments can be displayed on one line.

      Parameters

      • ...data: any[]

        Messages to print.

      Returns void

      No return value.

    • Prints text to the console, selecting the level from its contents: text containing "license not" or "Solution did not converge" is an error, text containing "warning" is a warning, and other text is informational.

      Parameters

      • text: string

        Text.

      Returns void

      No return value.

    • console.warn() prints a warning in yellow with a warn icon. Use it for potential problems that are not critical but should be addressed. Multiple arguments can be displayed on one line.

      Parameters

      • ...data: any[]

        Messages to print.

      Returns void

      No return value.