Adobe InDesign CS2 (4.0) Object Model JS: Sections

InDesign CS2

Class

Sections

 A collection of sections.

QuickLinks

add, anyItem, count, everyItem, firstItem, item, itemByID, itemByName, itemByRange, lastItem, middleItem, nextItem, previousItem, toSource

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

Section add ([reference: Page][, withProperties: Object])
Creates a new section.

ParameterTypeDescription
referencePageThe page on which the section begins. (Optional)
withPropertiesObjectInitial values for properties of the new Section (Optional)

Section anyItem ()
Returns any Section in the collection.

number count ()
Displays the number of elements in the Section.

Array of Section everyItem ()
Returns every Section in the collection.

Section firstItem ()
Returns the first Section in the collection.

Section item (index: any)
Returns the Section with the specified index or name.

ParameterTypeDescription
indexLong
String
The index or name. Can accept: Long or String.

Section itemByID (id: number)
Returns the Section with the specified ID.

ParameterTypeDescription
idnumberThe ID.

Section itemByName (name: string)
Returns the Section with the specified name.

ParameterTypeDescription
namestringThe name.

Array of Section itemByRange (from: any, to: any)
Returns the Sections within the specified range.

ParameterTypeDescription
fromLong
Section
String
The Section, index, or name at the beginning of the range. Can accept: Section, Long or String.
toLong
Section
String
The Section, index, or name at the end of the range. Can accept: Section, Long or String.

Section lastItem ()
Returns the last Section in the collection.

Section middleItem ()
Returns the middle Section in the collection.

Section nextItem (obj: Section)
Returns the Section whose index follows the specified Section in the collection.

ParameterTypeDescription
objSectionThe Section whose index comes before the desired Section.

Section previousItem (obj: Section)
Returns the Section with the index previous to the specified index.

ParameterTypeDescription
objSectionThe index of the Section that follows the desired Section.

string toSource ()
Generates a string which, if executed, will return the Section.

Element of

Document.sections

Jongware, 27-Jun-2010 v3.0.3dContents :: Index