How to call ecma from CMD

Use this forum for all posts and questions about the free QCAD Community Edition version 3

Moderator: andrew

Post Reply
Gurren_Joestar
Registered Member
Posts: 1
Joined: Mon Dec 14, 2020 7:56 pm

How to call ecma from CMD

Post by Gurren_Joestar » Mon Dec 14, 2020 8:19 pm

Hi, I would like to call ecma on CMD without starting QCad GUI. Is there any way that can make it possible?

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: How to call ecma from CMD

Post by CVH » Tue Dec 15, 2020 5:45 am

Hi,
I think you may find what you need at the bottom of:
https://qcad.org/en/tutorial-command-line-tool-scripts

https://qcad.org/en/tutorial-script-programming
Running Scripts from the Terminal

There should be a list of arguments for QCAD.exe somewhere ... :?
Similar as for:
https://qcad.org/en/products/qcad-command-line-tools

It can be printed out by: 'qcad -help'

Personally I am not able to run this on a win7 multi user, the UAC prevents me in running QCAD from the command line.
But I can read the autostart.js: :wink:

Code: Select all

function usage() {
    print("\nUsage: " + QCoreApplication.arguments()[0] + " [Options] [Files to open]\n"
          + "\n"
          + "-allow-multiple-instances        Don't try to avoid multiple instances from running\n"
          + "                                 simultaneously.\n"
          + "-always-load-scripts             Forces reloading of scripts when they are used.\n"
          + "                                 This is mainly useful during script development,\n"
          + "                                 to apply changes without restarting QCAD.\n"
          + "-app-id [ID]                     Set application ID. Multiple instances of the\n"
          + "                                 same application (same ID) cannot run\n"
          + "                                 simultaneously unless -allow-multiple-instances\n"
          + "                                 is used.\n"
          + "-autostart [script file]         Starts the given script file instead of the default\n"
          + "                                 scripts/autostart.js. Note that with this option,\n"
          + "                                 QCAD is not started but rather the application \n"
          + "                                 implemented in the given script.\n"
          + "-config [path]                   Reads and stores settings in a configuration file\n"
          + "                                 at the given location instead of the default location.\n"
          + "-debug-action-order              Print action order information in menus\n"
          + "-enable-script-debugger          Enables the script debugger.\n"
          + "                                 NOT recommended as this may cause unexpected\n"
          + "                                 behavior when using QCAD.\n"
          + "-exec [script file] [options]    Executes the given script file directly\n"
          + "                                 after staring QCAD. Options after the script\n"
          + "                                 file are passed on to the script.\n"
          + "-help                            Displays this help.\n"
          + "-ignore-script-files             Ignore script files on disk.\n"
          + "                                 Only load scripts from plugins if applicable.\n"
          + "-locale [locale]                 Sets the locale to be used (overrides\n"
          + "                                 the language set in the preferences).\n"
          + "                                 E.g. '-locale de' starts QCAD in German.\n"
          + "-no-gui                          Don't use GUI. X11: don't connect to X11 server.\n"
          + "-no-show                         Use but don't display GUI.\n"
          + "-filter [filter]                 Opens the subsequent file(s) with the explicitly \n"
          + "                                 given import filter.\n"
          + "-font-substitution A B           Substitute font A with font B.\n"
          + "-rescan                          Rescan scripts folder for new add-ons\n"
          + "-version                         Displays the application version.\n"
          + "-enable-xdata                    Enables XData (custom properties) support.\n"
          + "-quit                            Quits QCAD, for example after executing the\n"
          + "                                 given script(s).\n"
    );
Regards,
CVH

Post Reply

Return to “QCAD Community Edition”