Layers with `$` symbol in their name do not rasterize with dwg2bmp

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
garciadelcastillo
Active Member
Posts: 28
Joined: Fri May 10, 2019 6:26 pm

Layers with `$` symbol in their name do not rasterize with dwg2bmp

Post by garciadelcastillo » Thu Jul 18, 2019 7:33 pm

Hi!

I am having problems rasterizing layers with `$` symbols in their names: they always show up empty.

Given the following file:
layernames.dwg
(36.09 KiB) Downloaded 560 times
A full raster yields no problem:
layernames.dwg.png
layernames.dwg.png (21.31 KiB) Viewed 6466 times
Running rasterization on a layer without `$` in its name works fine:

Code: Select all

qcad.exe -no-gui -allow-multiple-instances -autostart scripts\Pro\Tools\Dwg2Bmp\Dwg2Bmp.js -background=white -width=1024 -height=1024 -force -antialiasing -monochrome -color-correction -zoom-all -no-weight-margin -layer=0 -outfile="layer0.png" layernames.dwg
layer0.png
layer0.png (10.1 KiB) Viewed 6466 times
However, running it on "Layer_with_$", yields a full white image:

Code: Select all

qcad.exe -no-gui -allow-multiple-instances -autostart scripts\Pro\Tools\Dwg2Bmp\Dwg2Bmp.js -background=white -width=1024 -height=1024 -force -antialiasing -monochrome -color-correction -zoom-all -no-weight-margin -layer="Layer_with_$" -outfile="Layer_with_$.png" layernames.dwg
I am assuming this is a problem with the CLI and system escaping of characters? Or the layer parser believing `$` is being used to escape a regexp? Any thoughts?

Thanks!

garciadelcastillo
Active Member
Posts: 28
Joined: Fri May 10, 2019 6:26 pm

Re: Layers with `$` symbol in their name do not rasterize with dwg2bmp

Post by garciadelcastillo » Thu Jul 18, 2019 7:39 pm

Oooooh, ok, `$` have to escaped...! This works:

Code: Select all

qcad.exe -no-gui -allow-multiple-instances -autostart scripts\Pro\Tools\Dwg2Bmp\Dwg2Bmp.js -background=white -width=1024 -height=1024 -force -antialiasing -monochrome -color-correction -zoom-all -no-weight-margin -layer="Layer_with_\$" -outfile="Layer_with_$.png" layernames.dwg

garciadelcastillo
Active Member
Posts: 28
Joined: Fri May 10, 2019 6:26 pm

Re: Layers with `$` symbol in their name do not rasterize with dwg2bmp

Post by garciadelcastillo » Thu Jul 18, 2019 7:56 pm

Feature request: it would be nice if QCAD spit some kind of warning message when trying to render a layer with a name that doesn't exist (and perhaps render nothing), rather than silently rendering an empty image. :D

Post Reply

Return to “QCAD Troubleshooting and Problems”