js plugin

Discussion forum for C++ and script developers who are using the QCAD development platform or who are looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files, scripts and screenshots.

Post one question per topic.

Post Reply
tiansch
Registered Member
Posts: 1
Joined: Wed Apr 19, 2023 6:17 am

js plugin

Post by tiansch » Wed Apr 19, 2023 6:27 am

I'm developing a plugin for QCADs and I've found the javascript language to be very handy and has greatly improved my efficiency.

However, I'm having a bit of trouble figuring out how to bring in an external open source JS library file.

The 'import' and 'request' keywords don't seem to work!

User avatar
andrew
Site Admin
Posts: 9062
Joined: Fri Mar 30, 2007 6:07 am

Re: js plugin

Post by andrew » Wed Apr 19, 2023 7:14 am

Code: Select all

include("path/to/file.js");
See also script examples at:
https://github.com/qcad/qcad/tree/maste ... c/Examples

And script tutorials at:
https://www.qcad.org/en/tutorial-script-programming

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”