A layer.
Properties
| 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 | readonly | A collection of buttons. |
| formFields | FormFields | readonly | A collection of form fields. |
| graphicLines | GraphicLines | readonly | A collection of graphic lines. |
| groups | Groups | readonly | A collection of groups. |
| guides | Guides | readonly | A collection of guides. |
| id | number | readonly | The unique ID of the Layer. |
| ignoreWrap | bool | r/w | 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 | r/w | A property that can be set to any string. |
| layerColor | any | r/w | 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. |
| locked | bool | r/w | If true, the Layer is locked. |
| lockGuides | bool | r/w | If true, the guide positions on the layer are locked. |
| name | string | r/w | The name of the Layer. |
| ovals | Ovals | readonly | A collection of ellipses. |
| pageItems | PageItems | 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 | readonly | A collection of polygons. |
| printable | bool | r/w | If true, the layer will print. |
| properties | Object | r/w | A property that allows setting of several properties at the same time. |
| rectangles | Rectangles | readonly | A collection of rectangles. |
| showGuides | bool | r/w | If true, guides are visible on the layer. |
| textFrames | TextFrames | readonly | A collection of text frames. |
| visible | bool | r/w | If true, the Layer is visible. |
Methods
Layerduplicate ()
Duplicates the Layer.
string extractLabel (key:
string)
Gets the label value associated with the specified key.
| Parameter | Type | Description |
|---|---|---|
| key | string | The key. |
Array of LayergetElements ()
Resolves the object specifier, creating an array of object references.
void 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. |
Layermerge (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. |
Layermove (to:
LocationOptions[, reference:
Layer])
Moves the Layer to the specified location.
| Parameter | Type | Description |
|---|---|---|
| to | LocationOptions : BEFORE AFTER AT_END AT_BEGINNING 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) |
void remove ()
Deletes the Layer.
string toSource ()
Generates a string which, if executed, will return the Layer.
string toSpecifier ()
Retrieves the object specifier.
Element of:
Button.itemLayer
Document.activeLayer
FormField.itemLayer
GraphicLine.itemLayer
Group.itemLayer
Guide.itemLayer
LayoutWindow.activeLayer
Movie.itemLayer
Oval.itemLayer
PageItem.itemLayer
Polygon.itemLayer
Rectangle.itemLayer
Sound.itemLayer
TextFrame.itemLayer
Used in:
Buttons.add (
[layer:
Layer ][, at:
LocationOptions=UNKNOWN ][, reference:
any][, withProperties:
Object])
Document.createTOC (
using:
TOCStyle[, replacing:
bool=false ][, fromBook:
Book][, placePoint:
Array of number][, includeOverset:
bool=false ][, destinationLayer:
Layer ])
GraphicLines.add (
[layer:
Layer ][, at:
LocationOptions=UNKNOWN ][, reference:
any][, withProperties:
Object])
Groups.add (
groupItems:
Array of PageItem[, layer:
Layer ][, at:
LocationOptions=UNKNOWN ][, reference:
any][, withProperties:
Object])
Guides.add (
[layer:
Layer ][, withProperties:
Object])
Index.generate (
[on:
any][, placePoint:
Array of number][, destinationLayer:
Layer ][, autoflowing:
bool=false ][, includeOverset:
bool=false ])
Layer.move (
to:
LocationOptions[, reference:
Layer ])
Layer.merge (
with:
Array of Layer )
Layers.previousItem (
obj:
Layer )
Layers.nextItem (
obj:
Layer )
MasterSpread.place (
fileName:
File[, placePoint:
Array of number][, destinationLayer:
Layer ][, showingOptions:
bool=false ][, autoflowing:
bool=false ][, withProperties:
Object])
MasterSpread.createGuides (
[numberOfRows:
number=0 ][, numberOfColumns:
number=0 ][, rowGutter:
number=0 ][, columnGutter:
number=0 ][, guideColor:
any=CYAN ][, fitMargins:
bool=false ][, removeExisting:
bool=false ][, layer:
Layer ])
Movies.add (
[layer:
Layer ][, at:
LocationOptions=UNKNOWN ][, reference:
any][, withProperties:
Object])
Ovals.add (
[layer:
Layer ][, at:
LocationOptions=UNKNOWN ][, reference:
any][, withProperties:
Object])
Page.place (
fileName:
File[, placePoint:
Array of number][, destinationLayer:
Layer ][, showingOptions:
bool=false ][, autoflowing:
bool=false ][, withProperties:
Object])
Polygons.add (
[layer:
Layer ][, numberOfSides:
number][, insetPercentage:
number][, at:
LocationOptions=UNKNOWN ][, reference:
any][, withProperties:
Object])
Rectangles.add (
[layer:
Layer ][, at:
LocationOptions=UNKNOWN ][, reference:
any][, withProperties:
Object])
Sounds.add (
[layer:
Layer ][, at:
LocationOptions=UNKNOWN ][, reference:
any][, withProperties:
Object])
Spread.place (
fileName:
File[, placePoint:
Array of number][, destinationLayer:
Layer ][, showingOptions:
bool=false ][, autoflowing:
bool=false ][, withProperties:
Object])
Spread.createGuides (
[numberOfRows:
number=0 ][, numberOfColumns:
number=0 ][, rowGutter:
number=0 ][, columnGutter:
number=0 ][, guideColor:
any=CYAN ][, fitMargins:
bool=false ][, removeExisting:
bool=false ][, layer:
Layer ])
TextFrames.add (
[layer:
Layer ][, at:
LocationOptions=UNKNOWN ][, reference:
any][, withProperties:
Object])
Returned by:
Layer Layer .duplicate (
)
Array of Layer Layer .getElements (
)
Layer Layer .merge (
with:
Array of Layer
)
Layer Layer .move (
to:
LocationOptions[, reference:
Layer ]
)
Layer Layers.add (
[withProperties:
Object]
)
Layer Layers.anyItem (
)
Array of Layer Layers.everyItem (
)
Layer Layers.firstItem (
)
Layer Layers.item (
index:
any
)
Layer Layers.itemByID (
id:
number
)
Layer Layers.itemByName (
name:
string
)
Array of Layer Layers.itemByRange (
from:
any, to:
any
)
Layer Layers.lastItem (
)
Layer Layers.middleItem (
)
Layer Layers.nextItem (
obj:
Layer
)
Layer Layers.previousItem (
obj:
Layer
)