Hello,
OS Windows 11 family
QCAD version 3.25.0.1
I wanted to the Script shell to automate some drawings.
I read the different tutorials, however when I tried to apply what I read, nothing happened. I searched through the different topics of the forum, but could not find anything relevant for my issue .
Here is what I did :
Menu Miscellaneous/development/Shell script
The shell script windows opens, displaying ecma>
I enter addLine(0,0,100,100), press the Enter key
Nothing happens : no line is displayed !
I must be missing something quite simple, as nobody has any issue with using the script shell.
Script Shell command does not do anything
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.
-
GMOURRAL
- Registered Member
- Posts: 2
- Joined: Fri Jan 30, 2026 7:41 am
-
CVH
- Premier Member
- Posts: 5145
- Joined: Wed Sep 27, 2017 4:17 pm
Re: Script Shell command does not do anything
Hi, and welcome to the QCAD forum.
With 4 values should draw a line from (0.0, 0.0) to (100.0, 100.0)
It is an instruction of the Simple API.
Scripting uses the comma as list separator ... That wouldn't be an issue when locally the semicolon is in use.
If nothing is drawn we expect a warning message on the Command Line history.
For example when the current active layer is locked, frozen or hidden.
With the GUI we might assume that the simple API is loaded but it doesn't hurt to be sure.
We then include simple.js so that the addLine method exists:
Works just fine in both versions.
I didn't test it with the 3.25.0.1 release but assume that it should work just like always.
Note that this is an older snapshot release (>2020/08/20 - 2020/08/31), current stable art is 3.32.6
Can anyone attempt this under the latest release and attempt the crash?
Crashing can be considered as a bug.
Regards,
CVH
Code: Select all
addLine(0,0,100,100);It is an instruction of the Simple API.
Scripting uses the comma as list separator ... That wouldn't be an issue when locally the semicolon is in use.
If nothing is drawn we expect a warning message on the Command Line history.
For example when the current active layer is locked, frozen or hidden.
- Transaction failed. Please check for block recursions and locked or invisible layers or blocks.
With the GUI we might assume that the simple API is loaded but it doesn't hurt to be sure.
We then include simple.js so that the addLine method exists:
Code: Select all
include("scripts/simple.js");
addLine(0,0,100,100);I didn't test it with the 3.25.0.1 release but assume that it should work just like always.
Note that this is an older snapshot release (>2020/08/20 - 2020/08/31), current stable art is 3.32.6
Can anyone attempt this under the latest release and attempt the crash?
Crashing can be considered as a bug.
Regards,
CVH
-
GMOURRAL
- Registered Member
- Posts: 2
- Joined: Fri Jan 30, 2026 7:41 am
Re: Script Shell command does not do anything
I also assumed the simple API was already loaded but it was not such a case.
I included simple.js and it worked fine.
Thank you for your help.
Regards
I included simple.js and it worked fine.
Thank you for your help.
Regards