Layer

A layer.

Methods:

duplicate, extractLabel, getElements, insertLabel, merge, move, remove, toSource, toSpecifier

Objects:

Boolean, Buttons, FormFields, Graphic, GraphicLines, Groups, Guides, Number, Object, Ovals, PageItem, PageItems, Polygons, Rectangles, String, TextFrames, UIColors,

Property Listing

Property

Type

Access

Description

allGraphics

Array of Graphic

readonly

Lists all graphics contained by the Layer.

allPageItems

Array of PageItem

readonly

Lists all page items contained by the Layer.

buttons

Buttons Button

readonly

A collection of buttons.

formFields

FormFields FormField

readonly

A collection of form fields.

graphicLines

GraphicLines GraphicLine

readonly

A collection of graphic lines.

groups

Groups Group

readonly

A collection of groups.

guides

Guides Guide

readonly

A collection of guides.

id

Number

readonly

The unique ID of the Layer.

ignoreWrap

Boolean

read/write

If true, text wrap settings applied to objects on the layer will not affect text on other layers when the layer is hidden.

index

Number

readonly

The index of the Layer within its containing object.

label

String

read/write

A property that can be set to any string.

layerColor

Array of 3 Reals (0 - 255)

UIColors

read/write

The color of the layer, specified either as an array of three doubles, each in the range 0 to 255 and representing R, G, and B values, or as a UI color. Can return: Array of 3 Reals (0 - 255) or UIColors enumerator.

lockGuides

Boolean

read/write

If true, the guide positions on the layer are locked.

locked

Boolean

read/write

If true, the Layer is locked.

name

String

read/write

The name of the Layer.

ovals

Ovals Oval

readonly

A collection of ellipses.

pageItems

PageItems PageItem

readonly

The page items collection, which can be used to process all page items in a container (such as a document, page, or group), regardless of type.

parent

Document

readonly

The parent of the Layer (a Document).

polygons

Polygons Polygon

readonly

A collection of polygons.

properties

Object

read/write

A property that allows setting of several properties at the same time.

rectangles

Rectangles Rectangle

readonly

A collection of rectangles.

showGuides

Boolean

read/write

If true, guides are visible on the layer.

textFrames

TextFrames TextFrame

readonly

A collection of text frames.

visible

Boolean

read/write

If true, the Layer is visible.

Method Listing

Layer duplicate ()

Duplicates the Layer.

String extractLabel (key:String)

Gets the label value associated with the specified key.

Parameter

Type

Description

key

String

The key.

Object getElements ()

Resolves the object specifier, creating an array of object references.

undefined insertLabel (key:String, value:String)

Sets the label to the value associated with the specified key.

Parameter

Type

Description

key

String

The key.

value

String

The value.

Layer merge (with:Array of Layer)

Merges the layer with other layer(s).

Parameter

Type

Description

with

Array of Layer

The layer(s) with which to merge.

Layer move (to:LocationOptions, reference:Layer)

Moves the Layer to the specified location.

Parameter

Type

Description

to

LocationOptions

LocationOptions.AFTER

LocationOptions.AT_BEGINNING

LocationOptions.AT_END

LocationOptions.BEFORE

LocationOptions.UNKNOWN

The location relative to the reference object or within the containing object.

reference

Layer

The reference object. Note: Required when the to value specifies before or after. (Optional)

undefined remove ()

Deletes the Layer.

String toSource ()

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

String toSpecifier ()

Retrieves the object specifier.

Object of

LayoutWindow.activeLayer

Button.itemLayer

FormField.itemLayer

GraphicLine.itemLayer

Group.itemLayer

Guide.itemLayer

Movie.itemLayer

Oval.itemLayer

PageItem.itemLayer

Polygon.itemLayer

Rectangle.itemLayer

Sound.itemLayer

TextFrame.itemLayer

Button.parent

FormField.parent

GraphicLine.parent

Group.parent

Guide.parent

Oval.parent

PageItem.parent

Polygon.parent

Rectangle.parent

TextFrame.parent

Return

Layers.add()

Layer.duplicate()

Layer.merge()

Layer.move()

Layers.anyItem()

Layers.everyItem()

Layers.nextItem()

Layers.previousItem()

Layers.itemByID()

Layers.item()

Layers.itemByName()

Layers.itemByRange()

Layers.firstItem()

Layers.lastItem()

Layers.middleItem()