Adobe InDesign CS6 Server (8.0) Object Model JS: Sections

InDesign Server CS6

Class

Sections

 A collection of sections.

See also Section.

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 [] (index: number)
Returns the Section with the specified index.

ParameterTypeDescription
indexnumberThe index.

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: varies)
Returns the Section with the specified index or name.

ParameterTypeDescription
indexLong Integer
String
The index or name. Can accept: Long Integer 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: varies, to: varies)
Returns the Sections within the specified range.

ParameterTypeDescription
fromLong Integer
Section
String
The Section, index, or name at the beginning of the range. Can accept: Section, Long Integer or String.
toLong Integer
Section
String
The Section, index, or name at the end of the range. Can accept: Section, Long Integer 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, 28-Apr-2012 v3.0.3iContents :: Index