Copy link to clipboard
Copied
I'm scaling a group up 200% with the standard AS approach, but sometimes rule thickness is not being scaled, or rules fail to meet up after scaling. Manually, I can resolved this by checking Scale Corners and Scale Strokes & Effects in the Scale dialog, or using the Expand menu item.
But I'm not seeing support for either approach via scripting. I've checked all the optional script parameters, most of which are set to true by default anyone. Example code:
scale selection horizontal scale scalePercentage vertical scale scalePercentage with transforming objects, transforming fill gradients, transforming fill patterns and transforming stroke patterns
TIA.
Copy link to clipboard
Copied
In JavaScript, changeLineWidths is the seventh parameter of resize() and is the same scale factor.
// select item
var f = 200; // scale factor
app.selection[0].resize(f, f, undefined, undefined, undefined, undefined, f);
Copy link to clipboard
Copied
Thank you. I will use JavaScript for this. There is no resize command in AppleScript, and the scale command does not have this parameter. Curious difference.
Copy link to clipboard
Copied
It’s the same command, named `scale` in AS and `resize` in JS. The parameter you want is `line scale`:
tell application "Adobe Illustrator"
tell document 1
scale path item 1 horizontal scale 200 vertical scale 200 line scale 200
end tell
end tell