Is it possible to have QCAD execute scripts to produce drawings? How about from C++ using the API? I mean, by not even running QCAD's graphical interface. I googled for the answer to that but only found stuff about writing plugins.
Further searching, I found an example of doing this in javascript: http://www.qcad.org/doc/qcad/latest/dev ... awing.html
Is there an example in C++? Using Qt, I guess.
scripting qcad?
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Re: scripting qcad?
Yes, have a look at the 'merge' command line tool included with QCAD consisting of:
- the launcher bash or batch scripts: merge / merge.bat
- the implementation in ECMAScript (JavaScript): scripts/Tools/MergeDrawings
- the launcher bash or batch scripts: merge / merge.bat
- the implementation in ECMAScript (JavaScript): scripts/Tools/MergeDrawings
Re: scripting qcad?
OK. I can use javascript if I have to, but is there a C++ example?
Re: scripting qcad?
No. JavaScript is the way to go.bobself wrote:but is there a C++ example?
You can write plugins in C++ provided you are using the same Qt version, compiler and compiler version we're using. Using the script interface is certainly far less painful.