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

How to force "scale corners" when using .resize() ?

Explorer ,
Dec 28, 2020 Dec 28, 2020

Copy link to clipboard

Copied

I simply want to resize my objects but sometimes I accidentally leave the "scale corners" option unchecked therefore rounded corners don't scale proportionally along with the rest of the object. Is there a way to force the scaling of corners with .resize somehow or some other way?

 

I'm already using this but it ignores scaling corners if the user option is accidentally left disabled:

x.resize(scaleMult, scaleMult, true, true, true, true, scaleMult, undefined)

 

Expanding the objects won't work in this case as a workaround since my objects are simple squares and other path types.

TOPICS
Scripting

Views

442

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

correct answers 1 Correct answer

Community Expert , Dec 28, 2020 Dec 28, 2020
// get/set Scale Corners
// carlos canto - 12/28/2020
// https://community.adobe.com/t5/illustrator/how-to-force-quot-scale-corners-quot-when-using-resize/td-p/11710892?page=1

// save original state
var scaleCorners = app.preferences.getIntegerPreference ("policyForPreservingCorners");

// check Scale Corners
app.preferences.setIntegerPreference ("policyForPreservingCorners",1); // 1-checked, 2-unchecked

// DO YOUR THING

// Reset Original Scale Corners Settings
app.preferences.setIntegerPrefe
...

Votes

Translate

Translate
Adobe
Community Expert ,
Dec 28, 2020 Dec 28, 2020

Copy link to clipboard

Copied

// get/set Scale Corners
// carlos canto - 12/28/2020
// https://community.adobe.com/t5/illustrator/how-to-force-quot-scale-corners-quot-when-using-resize/td-p/11710892?page=1

// save original state
var scaleCorners = app.preferences.getIntegerPreference ("policyForPreservingCorners");

// check Scale Corners
app.preferences.setIntegerPreference ("policyForPreservingCorners",1); // 1-checked, 2-unchecked

// DO YOUR THING

// Reset Original Scale Corners Settings
app.preferences.setIntegerPreference ("policyForPreservingCorners",scaleCorners);

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
Explorer ,
Dec 30, 2020 Dec 30, 2020

Copy link to clipboard

Copied

Thanks!

 

I found the "setIntegerPreference" method in the extendscript documentation but I was wondering where to find the information on the argument you provided for it. I can't find any list of information that contains the info like the "policyForPreservingCorners". How did you know that was the correct code?

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
Community Expert ,
Dec 30, 2020 Dec 30, 2020

Copy link to clipboard

Copied

LATEST

All available settings are in the Settings folder, check these two files

Adobe Illustrator Prefs

Adobe Illustrator Cloud Prefs

 

some settings are easy to spot, some others have names that seem to have no relation to what you need. I do a lot of trial an error.

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