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

Explorer ,
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

89

Likes

Translate

Translate

Report

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

1 Correct Answer

Adobe Community Professional , Dec 28, 2020
CarlosCanto Adobe Community Professional , 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...

Likes

Translate

Translate
Jump to answer Jump to answer
Adobe Community Professional ,
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);

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Explorer ,
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?

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Dec 30, 2020

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

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