InDesign2026
API 21.5.1.73
Collection of GraphicLayer

GraphicLayers

A collection of graphic layers.

Properties

NameType AccessDescription
Number readonly The number of objects in the collection.

Methods

GraphicLayer

Returns the GraphicLayer with the specified index.

index Number The index.
GraphicLayer

Returns any GraphicLayer in the collection.

Number

Displays the number of elements in the GraphicLayer.

GraphicLayer[]

Returns every GraphicLayer in the collection.

GraphicLayer

Returns the first GraphicLayer in the collection.

GraphicLayer

Returns the GraphicLayer with the specified index or name.

index LongInteger | String The index or name. Can accept: Long Integer or String.
GraphicLayer

Returns the GraphicLayer with the specified ID.

id Number The ID.
GraphicLayer

Returns the GraphicLayer with the specified name.

name String The name.
GraphicLayer[]

Returns the GraphicLayers within the specified range.

from GraphicLayer | LongInteger | String The GraphicLayer, index, or name at the beginning of the range. Can accept: GraphicLayer, Long Integer or String.
to GraphicLayer | LongInteger | String The GraphicLayer, index, or name at the end of the range. Can accept: GraphicLayer, Long Integer or String.
GraphicLayer

Returns the last GraphicLayer in the collection.

GraphicLayer

Returns the middle GraphicLayer in the collection.

GraphicLayer

Returns the GraphicLayer whose index follows the specified GraphicLayer in the collection.

obj GraphicLayer The GraphicLayer whose index comes before the desired GraphicLayer.
GraphicLayer

Returns the GraphicLayer with the index previous to the specified index.

obj GraphicLayer The index of the GraphicLayer that follows the desired GraphicLayer.
String

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

Object of 2

Properties elsewhere that hold a GraphicLayers.