Copy link to clipboard
Copied
Try the following code
var _layers = app.activeDocument.layers;
for (var l = 0; l<_layers.length; l++) {
var _images = _layers[l].rasterItems;
var _groups = _layers[l].groupItems;
alert(_layers[l].name + ' ---> ' + _images.length + ' images and ' + _groups.length + ' groups.');
}
Copy link to clipboard
Copied
Hi,
You want to get the number of groups and images in Layer 3 or all layers?
Copy link to clipboard
Copied
I have to validate that there are various layers containing the objects .
Copy link to clipboard
Copied
Try the following code
var _layers = app.activeDocument.layers;
for (var l = 0; l<_layers.length; l++) {
var _images = _layers[l].rasterItems;
var _groups = _layers[l].groupItems;
alert(_layers[l].name + ' ---> ' + _images.length + ' images and ' + _groups.length + ' groups.');
}
Copy link to clipboard
Copied
Hi!
alert( app.activeDocument.layers["Layer 3"].pageItems[0].typename);
Il existe une documentation que vous devriez consulter.
René