Hi - I'm new here. Just downloaded QCAD and ordered the book. I will attempt to learn the basics in the next few weeks, but I have a question in advance of the learning...
I would like to create a script to draw 20-30 circles of various areas, colors, and positions in QCAD. I know that QCAD supports scripting and it doesn't look too difficult to figure out. With that said, I looked at the example scripts and couldn't find what I want to do. I don't want to create a menu item that would enable me to draw one circle at a time. I'm looking for some sort of batch way to create them.
Can anyone point me in the direction of an example that might help me learn how to do this?
Thanks!
Mark
Drawing circles from a script?
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: Drawing circles from a script?
If this is a one time project, you can use the script shell:
View > Toolbars > Script Shell
You can enter ECMAScript (JavaScript) into the script shell directly, e.g.:
View > Toolbars > Script Shell
You can enter ECMAScript (JavaScript) into the script shell directly, e.g.:
for (i=0; i<10; i++) { addCircle(10,i*10,i); }This script uses the simplified API as defined in scripts/simple.js.
Re: Drawing circles from a script?
That's perfect! Thank you!