Answered
Modifying Y Offset value in ObStyles
Does this setting of object styles can be modified with a Javascript?
I have bunch of Object Styles that I need to reduced by 3mm the value found in the Y Offset field when enabled.
Does this setting of object styles can be modified with a Javascript?
I have bunch of Object Styles that I need to reduced by 3mm the value found in the Y Offset field when enabled.
Got my braces wrong there, sorry.
Also got my brackets wrong -- objStyles in line 5 needs an index [i].
Here's the fix, works over here.
var objStyles = app.activeDocument.allObjectStyles;
var adjust = -3;
for (var i = 1; i < objStyles.length; i++) {
try {
objStyles[i].transformAttributeOptions.transformAttrY += adjust;
} catch (_) {
}
}
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.