: How can I quickly turn all objects of a layer to independent layers in InDesign? How can I quickly turn all objects of a layer (text boxes, shapes, lines, etc.) to independent layers in InDesign
How can I quickly turn all objects of a layer (text boxes, shapes, lines, etc.) to independent layers in InDesign ?
More posts by @Tiffany317
1 Comments
Sorted by latest first Latest Oldest Best
This tiny script should do what you want:
#target InDesign
var doc = app.activeDocument;
for (var i = 1; i < doc.pageItems.length; i++) {
var newLayer = doc.layers.add();
doc.pageItems[i].itemLayer = newLayer;
}
For each page item it finds in the document, it creates a new layer and moves the item to the new layer.
Edit: As you actually need all objects of a layer to move to new layers, not all objects of the doc, the script would look like this instead:
#target InDesign
var doc = app.activeDocument;
var myLayer = doc.layers.item("Your layer's name");
for (var i = myLayer.pageItems.length - 1; i >= 1; i--) {
var newLayer = doc.layers.add();
myLayer.pageItems[i].itemLayer = newLayer;
}
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.