Setting stroke weight to 0 by script results in 1 pt
Given a frame (graphic or text) with stroke color set to 'None' and stroke weight set to 0, the jsx command "app.selection[0].strokeWeight = 0" sets the weight to 1pt and stroke color to the default swatch.
Steps to reproduce:
- Create a new Document.
- Create a new Text (or Graphic) Frame.
- Set the stroke weight to 0 and color to 'None' if necessary
- Select the frame with the Selection tool.
- Start a script with a following one line: app.selection[0].strokeWeight=0
Expected result: no change
Actual result: stroke weight set to 1pt and color to the default swatch.
Note:
Setting stroke weight to any other value behaves as expected.
InDesign CC2018 v13.0.1
-
Ben commented
Found out that setting the strokeWeight to 0.000001pt default to zero. But it still shows a thin line... Come on Adobe!!
-
Uwe Laubender commented
Still not fixed.
Just tested with InDesign 2021 version 16.3.0.24 on Windows 10.Regards,
Uwe Laubender
( ACP ) -
Maryan Hutsul commented
@Anton Petrov Thank you very much for the suggestion, works well so far :)
-
Anton Petrov commented
@Maryan Hutsul As a workaround, I found that just setting strokeColor = "None" does the trick. It sets the stroke weight to 0 in the same time. Reverse, setting the color of the 0-weight stroke to any other swatch automatically sets the weight to 1 pt (not to the default value, which is crazy!).
-
Maryan Hutsul commented
Also facing this problem. It is very frustrating since in some cases I need to set stroke weight multiple times to actually remove it, and in other cases if it didn't exist, setting it to zero adds it at 1 pt...
-
Uwe Laubender commented
Hi Anton,
that's still true with InDesign 2020 version 15.0.0.155.Thank you for posting this bug report.
Regards,
Uwe Laubender
( ACP )