Adobe InDesign CS5.5 Server (7.5) Object Model JS: Layers

InDesign Server CS5.5

Class

Layers

 A collection of layers.

See also Layer.

QuickLinks

[], add, anyItem, count, everyItem, firstItem, item, itemByID, itemByName, itemByRange, lastItem, middleItem, nextItem, previousItem, toSource

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

Layer [] (index: number)
Returns the Layer with the specified index.

ParameterTypeDescription
indexnumberThe index.

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

ParameterTypeDescription
withPropertiesObjectInitial values for properties of the new Layer (Optional)

Layer anyItem ()
Returns any Layer in the collection.

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

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

Layer firstItem ()
Returns the first Layer in the collection.

Layer item (index: varies)
Returns the Layer with the specified index or name.

ParameterTypeDescription
indexLong Integer
String
The index or name. Can accept: Long Integer or String.

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

ParameterTypeDescription
idnumberThe ID.

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

ParameterTypeDescription
namestringThe name.

Array of Layer itemByRange (from: varies, to: varies)
Returns the Layers within the specified range.

ParameterTypeDescription
fromLayer
Long Integer
String
The Layer, index, or name at the beginning of the range. Can accept: Layer, Long Integer or String.
toLayer
Long Integer
String
The Layer, index, or name at the end of the range. Can accept: Layer, Long Integer or String.

Layer lastItem ()
Returns the last Layer in the collection.

Layer middleItem ()
Returns the middle Layer in the collection.

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

ParameterTypeDescription
objLayerThe Layer whose index comes before the desired Layer.

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

ParameterTypeDescription
objLayerThe 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

Jongware, 28-Apr-2012 v3.0.3iContents :: Index