Sg2.9
Layer
Packages RSS

Extends Item

The Layer item represents a layer in an Illustrator document.

The layer which is currently active can be accessed through document.activeLayer. An array of all layers in a document can be accessed through document.layers.

Sample code:

print(document.activeLayer.name); // 'Layer 1'
var layer = new Layer();
layer.name = 'A new layer';
layer.activate();
print(document.activeLayer.name); // 'A new layer'
print(document.layers.length); // 2

Constructors

Properties

Functions

Inheritance