• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Scaling in Illustrator with AppleScript or other language

New Here ,
Apr 04, 2022 Apr 04, 2022

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.

TOPICS
Scripting

Views

248

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Guide ,
Apr 04, 2022 Apr 04, 2022

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);

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 05, 2022 Apr 05, 2022

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 05, 2022 Apr 05, 2022

Copy link to clipboard

Copied

LATEST

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

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines