My QCAD version is QCAD Pro 3.30.1.0, and my OS is Windows 10.
Currently, I have a speed-sensitive project that requires the use of dwg2dwg.bat.
The running speed of dwg2dwg.bat is insufficient to meet the requirements. Are there any ways to improve its running speed?
Please include an example of your command line instruction.
The size but certainly the complexity of the file will have a profound influence.
Any chance that you can attach such a ‘slow’ example.
Remind that dwg2dwg.bat is just a batch file that calls QCAD.
This probably takes not longer than a few micro seconds.
Prevent echoing
Starts qcadcmd.com with no GUI, allowing multiple instances, not using the standard auto start script but executing:
scripts\Pro\Tools\Dwg2Dwg\Dwg2Dwg.js and passing all other parameters.
Dwg2Dwg.js is again a stub that will process the parameters and instructs QCAD what to do.
The batch file itself is not to blame.
Nor is Dwg2Dwg.js.
QCAD must start up in the background, the file must be imported and exported, changes must be applied to the document.
Your command line instruction looks like a mix-up of things.
The content of dwgexplode.bat is:
@echo off
qcadcmd.com -no-gui -allow-multiple-instances -autostart scripts\Pro\Tools\DwgExplode\DwgExplode.js %0 %*
%0 refers to the name of the batch file itself as it was called, here “dwgexplode.bat”. %* stands for all parameters specified in the OS command line that calls the batch file.
You can call that from the OS command line with for example:
E:\QCad\dwgexplode.bat -f -o output.dxf test.dwg
The very last parameter is typically the file to load: “test.dwg”.
Other parameters are then: “-f -o output.dxf”
Remark that no path was specified for the in- or output file.
What would result in the current, the QCAD application path.
-autostart [script file]
Starts the given script file instead of the default
scripts/autostart.js. Note that with this option,
QCAD is not started but rather the application
implemented in the given script.
The argument after -autostart
scripts\Pro\Tools\DwgExplode\DwgExplode.js doesn’t mount an application.
It executes the DwgExplode stub.
And that handles the parameters.
But your instruction line includes placeholders %0 %* AND the parameters for them.
I think that you can’t mix that.
Removing only “-autostart” mounts the QCAD application (supposedly without a GUI) but doesn’t executes a script.
It may attempt to load a drawing file.
To execute a script after the QCAD application is mounted requires an argument after an -exec switch.
Optionally followed by option arguments for that script.
I am not sure that you can initiate the pro script DwgExplode.js with your instruction line excluding “-autostart”.
What then follows after -allow-multiple-instances is probably ignored as bogus.
I think that Windows ignores double backslashes.
Also had to use normal slashes instead, sometimes it is auto-fixed, sometimes not.
On script level it are normal slashes.