Copy link to clipboard
Copied
I needs to check the property before apply the object style. please advice
Copy link to clipboard
Copied
Did you look into the methods
undefined clearObjectStyleOverrides ()
and
undefined applyObjectStyle (using:ObjectStyle, [clearingOverrides:Boolean=Boolean], [clearingOverridesThroughRootObjectStyle:Boolean=Boolean])
Look at the method details from the following link
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#PageItem.html#d1e208048__d1e209699
-Manan
Copy link to clipboard
Copied
clearingOverridesThroughRootObjectStyle. Am not clear how do i use this method when i apply object style
Copy link to clipboard
Copied
Many objects/pageItems have the property "overridden". So, you can check if the object is overridden before applying an override. This line of code below checks if a pageItem has been overridden, and if it hasn't, it overrides it.
if ( !pageItem.overidden ) {
pageItem.applyObjectStyle("Style to Apply", true);
}