Reply To: Object Layer Options Scripting

#60612

Main();

function Main() {
var page, placedFile, graphics, i, j,
doc = app.activeDocument,
pages = doc.pages;

for (i = 0; i < pages.length; i++) {
page = pages[i];
var graphics = page.allGraphics;
for (j = graphics.length-1; j >= 0; j–) {
placedFile = page.allGraphics[j];
if (placedFile.constructor.name == “ImportedPage” && placedFile.itemLink.linkType == “InDesign Format Name”) {
try {
placedFile.graphicLayerOptions.graphicLayers.item(“Frames”).currentVisibility = false;
}
catch (err) {}
}
}

}

alert(“Done”);
}

P.S. Written in InDesign CS5.5, Windows.

Hope this helps.

Kasyan

This article was last modified on September 27, 2011

Comments (0)

Loading comments...