Copy link to clipboard
Copied
Hello forum,
who knows, which command is needed to align a dashed stroke like this with JS - AI CS4+
(not the command for creating a dashed stroke and also not the way with graphic style and app.doScript and also not shpage AdjustDashes)
grateful for any help
pixxxelschubser
I think that's one of the many things not accessible to scripting in Illustrator. You might get something by playing around with strokeDashOffset but no guarantees.
Copy link to clipboard
Copied
I think that's one of the many things not accessible to scripting in Illustrator. You might get something by playing around with strokeDashOffset but no guarantees.
Copy link to clipboard
Copied
agree, I don't think we have such command...one more thing, Align Dashes debuted in CS5.
Copy link to clipboard
Copied
I have suspected it, it's a shame.
@Larry,
there is no way (easy to work with different widths and heights).
I wanted to mark your post as helpful, but I do not find the button.
Copy link to clipboard
Copied
thanks pixxxel, no problem, I think the helpful button is a casualty of the last jive "upgrade"
Copy link to clipboard
Copied
I was working on the problem or reading this property (I don't need to write it, so my job is easier). I've written an ExtendScript function that takes a pathItem as input and returns true is the stroke dashes are aligned. See this question.
Also, just pondering a bit... it might be conceivable (assuming you're okay with the hacky mischief I used in my function) that you could instantiate a model pathItem from a file or library asset that *already had the property turned on*, and then modify from the inside-out, to match your actual target object exactly (one that doesn't have the dashes aligning). This would only work if the target path item didn't use anything else that the API can't access. Just a crazy idea.
- Mark