Page 1 of 1
[solved]How to execute Purge command from the command line
Posted: Fri May 17, 2019 10:44 am
by t.ogawa
Hello.
Please tell me how to execute 「purgeblocks」 command from the command line.
input dxf
↓
do purgeblocks -> out dxf
↓
dwg2pdf
↓
output pdf
I want to realize all the above with commands.
thank you.
Re: How to execute Purge command from the command line
Posted: Fri May 17, 2019 2:51 pm
by andrew
There is no command line tool in QCAD to do that.
You can create your own script and trigger:
Code: Select all
include("scripts/Pro/Block/PurgeBlocks/PurgeBlocks.js");
...
PurgeBlocks.purgeBlocks(di);
Where di is the document interface.
See also:
https://qcad.org/en/tutorial-command-line-tool-scripts
You'd typically insert PurgeBlocks.purgeBlocks(di); instead lines 66-69.
Re: How to execute Purge command from the command line
Posted: Mon May 20, 2019 4:37 am
by t.ogawa
Hi Andrew.
Thank you for you reply.
The following error was displayed when executing the method taught.
[Command]
Code: Select all
./qcad -platform -no-gui -allow-multiple-instances -autostart qcad_purgeblock.js -f -o out.dxf in.dxf
[Terminal]
Code: Select all
QCAD version 3.22.0
Fatal: This application failed to start because it could not find or load the Qt platform plugin "-no-gui"
in "".
Available platform plugins are: cocoa.
Reinstalling the application may fix this problem.
./qcad: line 18: 49991 Abort trap: 6 DYLD_LIBRARY_PATH="$DIR" "$binary" "$@"
Do I need to install any additional software?
thank you.
Re: How to execute Purge command from the command line
Posted: Mon May 20, 2019 6:09 am
by t.ogawa
The problem is solved.
It changed when the character code was changed to utf8.
It is probably the same problem as the question being asked.
https://qcad.org/rsforum/viewtopic.php?f=33&t=6280
Thank you for your response.