Edit in GitHubLog an issue

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 clipboard
1// Iterate through all the top layers of frontmost document
2app.activeDocument.layers.forEach(h => console.log(h.name));

Hierarchy#

Properties#

NameTypeAccessDescription
lengthnumberRead-onlyNumber of Layer elements in this collection
typenamestringRead-onlyThe name for this object collection: Layers

Methods#

add#

async : Promise<Layer>

Create a new layer.


getByName#

Layer

Find the first layer with the matching name

Parameters#

NameType
namestring
Was this helpful?
Copyright © 2021 Adobe. All rights reserved.