Layers

A collection of layers.

Methods

Layeradd ([withProperties:
Object])
Creates a new Layer.

Parameter Type Description
withProperties Object Initial values for properties of the new Layer (Optional)

LayeranyItem ()
Returns any Layer in the collection.

number count ()
Displays the number of elements in the Layer.

Array of LayereveryItem ()
Returns every Layer in the collection.

LayerfirstItem ()
Returns the first Layer in the collection.

Layeritem (index:
any)
Returns the Layer with the specified index or name.

Parameter Type Description
index Long Integer
String
The index or name. Can accept: Long Integer or String.

LayeritemByID (id:
number)
Returns the Layer with the specified ID.

Parameter Type Description
id number The ID.

LayeritemByName (name:
string)
Returns the Layer with the specified name.

Parameter Type Description
name string The name.

Array of LayeritemByRange (from:
any, to:
any)
Returns the Layers within the specified range.

Parameter Type Description
from Layer
Long Integer
String
The Layer, index, or name at the beginning of the range. Can accept: Layer, Long Integer or String.
to Layer
Long Integer
String
The Layer, index, or name at the end of the range. Can accept: Layer, Long Integer or String.

LayerlastItem ()
Returns the last Layer in the collection.

LayermiddleItem ()
Returns the middle Layer in the collection.

LayernextItem (obj:
Layer)
Returns the Layer whose index follows the specified Layer in the collection.

Parameter Type Description
obj Layer The Layer whose index comes before the desired Layer.

LayerpreviousItem (obj:
Layer)
Returns the Layer with the index previous to the specified index.

Parameter Type Description
obj Layer The index of the Layer that follows the desired Layer.

string toSource ()
Generates a string which, if executed, will return the Layer.

Element of:

Document.layers

Leave a Comment

Previous post:

Next post: