Skip to main content
Known Participant
January 24, 2023
Answered

Dashed line off script

  • January 24, 2023
  • 2 replies
  • 352 views

Hello.
I have a quick question.

I have created a script that draws something for me
How can I disable the dashed line in a script?
what I wrote below doesn't throw an error, but it doesn't work either

 

line.strokeDashes = false;

This topic has been closed for replies.
Correct answer CarlosCanto

the correct syntax to turn a dash line into a straight line is

line.strokeDashes = [];

 

2 replies

CarlosCanto
Community Expert
CarlosCantoCommunity ExpertCorrect answer
Community Expert
January 25, 2023

the correct syntax to turn a dash line into a straight line is

line.strokeDashes = [];

 

Mylenium
Legend
January 24, 2023

Do you actually retrieve the active object and its stroke property so it is selected? Sounds like that is exactly the problem. You're probably creating the objects and it stays no longer active once the script is finished.

 

Mylenium