Page 1 of 1

How to catch command from command line in a script

Posted: Mon Nov 27, 2017 3:54 pm
by dzenita
Hi all,

QCad has support for drawing lines, circles via command line like this :

2017-11-27 15_39_08-Untitled 1 _ - QCAD.png
2017-11-27 15_39_08-Untitled 1 _ - QCAD.png (13.99 KiB) Viewed 6262 times
but how can we draw line using one row, one step, using command like this --> line (10;10 , 20;20)

And how to catch command from command line in a script ?
I have some custom functions which I should call from command line with parameters in one row, is that possible. I am using QCad 3.19.1 version.


Thanks,
Dzenita

Re: How to catch command from command line in a script

Posted: Mon Nov 27, 2017 4:48 pm
by andrew
You might want to use the script shell for this:

View > Toolbars > Script Shell

Code: Select all

addLine(10,10, 20,20);

Code: Select all

for (i=0; i<10; i++) { addLine(10,i*10, 20,i*10); }
See also:
https://www.qcad.org/doc/qcad/latest/de ... imple.html

Re: How to catch command from command line in a script

Posted: Wed Nov 29, 2017 1:19 pm
by dzenita
Great, thanks a lot Andrew.

Best regards,
Dzenita