InDesign2026
API 21.5.1.73
Collection of State

States

A collection of states.

Properties

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

Methods

→ State

Returns the State with the specified index.

index Number The index.
→ State

Creates a new State.

withProperties? Object Initial values for properties of the new State
→ State

Returns any State in the collection.

→ Number

Displays the number of elements in the State.

→ State[]

Returns every State in the collection.

→ State

Returns the first State in the collection.

→ State

Returns the State with the specified index or name.

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

Returns the State with the specified ID.

id Number The ID.
→ State

Returns the State with the specified name.

name String The name.
→ State[]

Returns the States within the specified range.

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

Returns the last State in the collection.

→ State

Returns the middle State in the collection.

→ State

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

obj State The State whose index comes before the desired State.
→ State

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

obj State The index of the State that follows the desired State.
→ String

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

Object of 4

Properties elsewhere that hold a States.