08.08.14, 15:24
hey, i ´m looking for a solution to copy+paste layers.
this is what i got right now:
var srcDoc = documents[0];
var srcLayer = srcDoc.layers[0];
for (j=1, p=2; j<pages; j++, p++){
var targetLayer = srcDoc.layers.add();
for ( k = 0; k < srcLayer.pageItems.length; k++) {
var srcItem = srcLayer.pageItems[k];
var dupItem = srcItem.duplicate( targetLayer, ElementPlacement.PLACEATEND );
}
targetLayer.visible = false;
}
Is there a way to do it faster?
its really laggy.
Thx for attention.