Page 1 of 1

I use a custom JS file to convert DWG/DXF files to PNG via the command line

Posted: Mon Jun 16, 2025 10:12 am
by hik-IT
I use a custom JS file to convert DWG/DXF files to PNG via the command line:
qcadcmd.com -platform offscreen -no-gui -autostart scripts/dwg2png.js -input input.dwg -output output.png 2>error.log
The JS file can be loaded and executed, but the conversion to PNG did not succeed.

Additionally, how to suppress debug messages in the console output and keep only errors?

Environment
Windows10
Qcad 3.23.3 pro

Re: I use a custom JS file to convert DWG/DXF files to PNG via the command line

Posted: Mon Jun 16, 2025 2:31 pm
by andrew
May I ask if this is AI generated code? Since much of the API is dreamed up and non-existent.

Also, are you aware of dwg2bmp which comes with every installation of QCAD Professional and converts DXF and DWG files to many bitmap formats including PNG?

Under Linux, macOS or cygwin (Windows), you can use grep to filter messages. In the standard Windows command line, there's probably no easy way.