How to clear object style overrides of page item default in InDesign

Hy guys,

I’m working on a script that draws registration marks around a page. Every thing is working fine but if by mistake I change the default opacity from 100% to 50% before running the script, every object on the page is created at 50% opacity.

So I want to clear object style overrides of page item default before drawing anything. I know it’s juste a simple line but i can’t seems to make it work.

Any idea.

Thanks!

Hi,

if you add a new page item by script you should apply the object style you want to use.

sth. like this:

apply object style using myCustomObjectStyle clearing
overrides yes

As I’m not on a mac this evening …
JS has the option:

app.activeDocument.pageItems[0].clearObjectStyleOverrides()

So have a look at the AS dictionary to find a command like this

I know this command line is not right but i don’t know how to make it work.


tell application "Adobe InDesign CS4"
	set myDoc to active document
	tell page item default of myDoc to clear object style overrides
end tell