Layers
A collections class allowing for array access into the applications
list of layers on a document,
while also providing familiar methods from ExtendScript, like getByName
Copied to your clipboard1// Iterate through all the top layers of frontmost document2app.activeDocument.layers.forEach(h => console.log(h.name));
Hierarchy#
Array<Layer>
↳ Layers
Indexable#
â–ª [index: number]: Layer
Used to access the layers in the collection
Copied to your clipboard1// Iterate through all the top layers of frontmost document2app.activeDocument.layers.forEach(h => console.log(h.name));
Properties#
| Name | Type | Access | Description |
|---|---|---|---|
| length | number | Read-only | Number of Layer elements in this collection |
| typename | string | Read-only | The name for this object collection: Layers |
Methods#
add#
async : Promise<Layer>
Create a new layer.
getByName#
Find the first layer with the matching name
Parameters#
| Name | Type |
|---|---|
name | string |
