QCAD.org Forum

Discussion forum for contributors and developers who are using the QCAD version 3 ECMAScript development platform or the C++ plugin interface or who are otherwise looking to contribute to QCAD (translations, documentation, etc).

I start with script to draw a spiral. ExMathSpiral. I can change the body of function to draw something else, but I'm not able to change function name, script file name and directory with script. Probably there is some dependences to other files in directory MathExamples but I don't know which one. There is only MathExamples.js included at begin of the script but when I move the script file to other directory and change the path to MathExamples.js the script stop working.

In the tutorial "Command Line Tools > Creating a Drawing" start with new document. How can I start with current .dwg file with some drawing and continue drawing to this file by command line script (no-gui mode). I can create Tool by tutorial "Creating a New Tool" which can do that, but it can't run it in no-gui mode.

I have one more question to Persistent Widgets in tutorial. There are only two buttons in one Button Box. "OK" Store the new user input, "Cancel" terminate function. How can I set action to other buttons in my GUI. I want to create third button for this action:

To create dialogs, layouts, etc, you may prefer to use the Qt Designer UI design WYSIWYG tool. The resulting .ui files can be used directly in your ECMAScript classes like the file PersistentWidgets.ui is used by the PersistentWidgets example.

Now I'm not sure if is clear create layer by script in current document provided I don't know that layer with this name didn't be created in this document yet. Or it's better fist check, by some condition, that layer don't exist. Something like: