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.
// 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
...
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);
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?
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.