Skip to main content
Legend
February 14, 2025
Question

How to set only stroke to default graphic style in a script?

  • February 14, 2025
  • 1 reply
  • 230 views

When the shortcut D is pressed, the default fill and stroke are set. With similar behavior, I want to make only stroke exactly the same as the default graphic style, without changing the current fill. This is probably not a feature in Illustrator, right?

 

Not only making the main properties similar, such as stroke width, but also making the appearance exactly the same. Of course I know that script can't handle the appearance, but I'm trying to find a path to achieve this in some way, such as dynamic actions or applying graphic styles. If it can be done with normal Illustrator functionality, that's fine.

 

Any ideas?

1 reply

CarlosCanto
Community Expert
Community Expert
February 14, 2025

perhaps

Dup shape, apply Graphic Style, restore fill from Dup, remove Dup?

sttk3Author
Legend
February 18, 2025

Thanks for the idea.

For this method, it seems that I will need to somehow move or erase only the fill appearance. I'm stuck on this part.