Recently I purchased a qcad server license.
I bought that product and looked at the examples, but I don't know how to do it.
Wasn't it considered at all and should I simply use the command line? Or is there any other way I can use it in node.js?
Sorry for asking a rude question.
Can I use qcad javascript in node.js?
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: Can I use qcad javascript in node.js?
QCAD runs its own JavaScript engine to provide the extensive Qt and QCAD API to scripts and execute them. QCAD does not use node.js but the Qt QScriptEngine which integrates well with the Qt toolkit.
To use QCAD in a server environment, you can use the provided command line tools or create your own command line tools. You can run commands in node.js using the child_process module.
To use QCAD in a server environment, you can use the provided command line tools or create your own command line tools. You can run commands in node.js using the child_process module.
Re: Can I use qcad javascript in node.js?
For example, if I move the simple API to another directory and run it, does it work well? For example using require or import.
Re: Can I use qcad javascript in node.js?
No. Again, QCAD has no relationship with Node.js at all. QCAD scripts can only run in the context of QCAD. I.e. QCAD runs the scripts.
Re: Can I use qcad javascript in node.js?
You can run a qcad command line script using spawn() to spawn a child process in node.js. I have done it for long dwg2maptiles jobs.