Running the Command Line Tools Script Example

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules
Always indicate Operating system, QCAD version
Attach Drawing files, Screenshots
Post one question per topic.
Post Reply
frb
Newbie Member
Posts: 3
Joined: Wed Aug 07, 2019 7:56 pm

Running the Command Line Tools Script Example

Post by frb » Wed Aug 07, 2019 8:02 pm

Hi all,

I have installed the CAD 3.23.0 / Windows x86_64

I am trying to run the example from:

https://qcad.org/en/tutorial-command-line-tool-scripts

My QCAD is installed at

C:\Program Files\QCAD>

and the script which comes with the source code is at
C:\Qcad\qcad\scripts\Tools\ExTool\ExTool.js

I run the command

C:\Program Files\QCAD>qcad -autostart C:\Qcad\qcad\scripts\Tools\ExTool\ExTool.js

and nothing happens, I am expecting the file out.dxf to be created somewhere but nothing happens, what am I doing wrong?

Thanks, BR

Fernando

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

Re: Running the Command Line Tools Script Example

Post by andrew » Thu Aug 08, 2019 1:10 pm

Can you try:

Code: Select all

qcad.exe -autostart scripts/Tools/ExTool/ExTool.js

frb
Newbie Member
Posts: 3
Joined: Wed Aug 07, 2019 7:56 pm

Re: Running the Command Line Tools Script Example

Post by frb » Thu Aug 08, 2019 9:04 pm

Hello Andrew,

Thanks for the answer,

I´ve done as requested and again nothing happens.

If you or somebody could record a video showing how to run the command line script, the folder structure, where the files are located and where the output file is created it would be useful.

Thanks best regards

Fernando

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

Re: Running the Command Line Tools Script Example

Post by andrew » Fri Aug 09, 2019 9:19 am

Did you also pass the parameters as indicated in the tutorial?

I.e.:

Code: Select all

qcad.exe -autostart scripts/Tools/ExTool/ExTool.js -f -o out.dxf in.dxf
Where in.dxf is an existing DXF file in the QCAD installation directory (where the qcad.exe file is).

frb
Newbie Member
Posts: 3
Joined: Wed Aug 07, 2019 7:56 pm

Re: Running the Command Line Tools Script Example

Post by frb » Fri Aug 09, 2019 4:51 pm

Hello Andrew,

Yes I do have a in.dxf file in the same folder where qcad.exe is

I typed

C:\Program Files\QCAD>qcad.exe -autostart scripts/Tools/ExTool/ExTool.js -f -o out.dxf in.dxf

and all I have is

C:\Program Files\QCAD>qcad.exe -autostart scripts/Tools/ExTool/ExTool.js -f -o out.dxf in.dxf

C:\Program Files\QCAD>

Sometimes we can not run stuff properly from the folder Program Files due to the windows restrictions, then I reinstalled everything in

C:\QCADCAM>

and I run both commands below

C:\QCADCAM>qcad.exe -autostart scripts/Tools/ExTool/ExTool.js -f -o out.dxf in.dxf

C:\QCADCAM>

C:\QCADCAM>qcad.exe -autostart C:\Qcad\qcad\scripts\Tools\ExTool\ExTool.js -f -o out.dxf in.dxf

C:\QCADCAM>

The last because my qcad source code is in a different folder

the out.dxf was not created anywhere, I do not have any message printed in my console

thanks, regards

Fernando

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

Re: Running the Command Line Tools Script Example

Post by andrew » Wed Aug 14, 2019 9:25 am

You might want to try:

Code: Select all

qcad.exe -autostart scripts/Tools/ExTool/ExTool.js -f -o out.dxf in.dxf 2>log
And then:

Code: Select all

type log
To see if there are any errors.

Post Reply

Return to “QCAD 'How Do I' Questions”