Scripting Layers; Creating Layers; Referring To Layers - Adobe 0046100128056 - InDesign - Mac Manual

Javascript
Table of Contents

Advertisement

C
4: Working with Layers
HAPTER

Scripting Layers

In InDesign's user interface, you add, delete, rearrange, duplicate, and merge layers using the Layers panel.
You also can change the layer to which a selected page item is assigned by dragging and dropping the
layer proxy in the Layers panel. (For more on assigning objects to a layer, see the InDesign online help.)
This section shows how to accomplish these tasks using InDesign scripting.

Creating layers

The following script fragment shows how to create a new layer. (For the complete script, see AddLayer.)
//Given a document "myDocument"...
var myLayer = myDocument.layers.add();
When you create a new layer, the layer appears above all other layers in the document.

Referring to layers

InDesign scripting offers several ways to refer to a layer object. This section describes the most common
ways to refer to layers.
Scripting Layers 51

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Indesign cs5

Table of Contents