Skip to main content
Legend
Feb 14, 2025 12:41 PM UTC
Question

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

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?

2 replies

CarlosCanto
Community Expert
Community Expert
Feb 14, 2025 8:15 PM UTC

perhaps

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

Translate
sttk3Author
Legend
Feb 18, 2025 8:50 AM UTC

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.

Translate