Trouble in converting DWG in BMP

Please use this forum to post feedback and suggestions related to QCAD.

Moderator: andrew

Post Reply
jcthomas
Junior Member
Posts: 11
Joined: Mon Jun 17, 2019 4:49 pm

Trouble in converting DWG in BMP

Post by jcthomas » Mon Jun 17, 2019 4:58 pm

Dear,

I try converting the VISION layer of the attached DWG file in BMP.
That does not work...
The VISION layer is visble throught QCAD interface (green one), but the resulting BMP is empty after conversion.
Same trouble via the dwg2bmp.bat command line !
I performed this conversion thanks to eDrawing, the resulting BMP file is ok.

I need to convert automatically about 5000 DWG files in BMP.
All the DWG files contain a VISION layer and I meet the beviour described above many times.
I can send you others DWG files if needed.

Thanks in advance for your answer and may be a fix in the QCAD source code.
Attachments
test.dwg
DWG file
(92.53 KiB) Downloaded 86 times

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

Re: Trouble in converting DWG in BMP

Post by andrew » Mon Jun 17, 2019 6:21 pm

The problem is caused by layer "VISION" being marked as "not plottable" (see layer edit dialog).

Arguably, bitmap exports should not be treated as a "plot".

Report at:
https://qcad.org/bugtracker/index.php?d ... sk_id=1904

jcthomas
Junior Member
Posts: 11
Joined: Mon Jun 17, 2019 4:49 pm

Re: Trouble in converting DWG in BMP

Post by jcthomas » Tue Jun 18, 2019 2:21 pm

Thank you for your quick answer !
Is there a way to get the list of available layers in DWG file thanks command line, with properties of these layers like plottable i.e. ?
Regards

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

Re: Trouble in converting DWG in BMP

Post by andrew » Tue Jun 18, 2019 2:29 pm

No, you'd have to implement your own script to do that.

jcthomas
Junior Member
Posts: 11
Joined: Mon Jun 17, 2019 4:49 pm

Re: Trouble in converting DWG in BMP

Post by jcthomas » Tue Jun 18, 2019 4:30 pm

Ok, but I cannot find the API of your script language...
Is there any script API documentation in addition to the script samples provided with QCAD Professional ?

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

Re: Trouble in converting DWG in BMP

Post by andrew » Wed Jun 19, 2019 8:56 am

The entire QCAD API is available through scripts.

Here's the RLayer class API:
https://qcad.org/doc/qcad/latest/develo ... layer.html

Function Layer.lockUnlock provides an example of iterating through all layers in a drawing:
https://github.com/qcad/qcad/blob/maste ... r/Layer.js

jcthomas
Junior Member
Posts: 11
Joined: Mon Jun 17, 2019 4:49 pm

Re: Trouble in converting DWG in BMP

Post by jcthomas » Wed Jun 19, 2019 10:10 am

Many thanks for your support !
I am very surprised, under the "scripts" directory in QCAD installation folder, there is only one folder named "Misc".
There is nothing more, the path "scripts\Pro\Tools" does not exist... Please where can I find it in order to modify the "Dwg2Bmp.js" file ?

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

Re: Trouble in converting DWG in BMP

Post by andrew » Wed Jun 19, 2019 10:42 am

Dwg2Bmp.js is part of QCAD Professional and not open source.

Other scripts that are part of the QCAD Community Edition are available at:
https://github.com/qcad/qcad/tree/master/scripts

See also scripts/readme.txt of your QCAD installation.

Post Reply

Return to “QCAD Suggestions and Feedback”