Index

An index.

Properties

Property Type Access Description
allTopics Array of Topic readonly The topics in the specified index section.
id number readonly The unique ID of the Index.
index number readonly The index of the Index within its containing object.
indexSections IndexSections readonly A collection of index sections.
label string r/w A property that can be set to any string.
name string r/w The name of the Index.
parent Document readonly The parent of the Index (a Document).
properties Object r/w A property that allows setting of several properties at the same time.
topics Topics readonly A collection of index topics.

Methods

void capitalize ([capitalizationOption: IndexCapitalizationOptions=ALL_ENTRIES])
Makes the initial letter for the specified index topic or group of index topics upper case.

Parameter Type Description
capitalizationOption IndexCapitalizationOptions :
SELECTED_ENTRY
INCLUDE_SUBENTRIES
ALL_LEVEL_1_ENTRIES
ALL_ENTRIES
The entry or entries to capitalize. (Optional) (default: ALL_ENTRIES)

string extractLabel (key: string)
Gets the label value associated with the specified key.

Parameter Type Description
key string The key.

Array of Story generate ([on: any][, placePoint: Array of number][, destinationLayer: Layer][, autoflowing: bool=false][, includeOverset: bool=false])
Generates a new index story.

Parameter Type Description
on Page
Spread
MasterSpread
The spread or page on which to place the story. Can accept: Page, Spread or MasterSpread. (Optional)
placePoint Array of number The coordinates of the upper left corner of the story bounding box, in the format [x, y]. (Optional)
destinationLayer Layer The layer on which to place the story. (Optional)
autoflowing bool If true, allows the story to flow onto subsequent pages if the story does not fit on the specified page. If no subsequent pages exist in the document, creates the necessary pages. (Optional) (default: false)
includeOverset bool If true, includes topics in overset text in the story. (Optional) (default: false)

Array of Index getElements ()
Resolves the object specifier, creating an array of object references.

void importTopics (from: File)
Imports a list of index topics.

Parameter Type Description
from File The file from which to import the topics.

void insertLabel (key: string, value: string)
Sets the label to the value associated with the specified key.

Parameter Type Description
key string The key.
value string The value.

void removeUnusedTopics ()
Removes all index topics that do not have any index entries. For information, see page reference.

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

string toSpecifier ()
Retrieves the object specifier.

void update ()
Updates the index preview pane. Note: Does not update the index.

Element of:

IndexSection.parent

Used in:

Indexes.previousItem ( obj: Index)
Indexes.nextItem ( obj: Index)

Returned by:

Array of Index Index.getElements ( )
Index Indexes.add ( [withProperties: Object] )
Index Indexes.anyItem ( )
Array of Index Indexes.everyItem ( )
Index Indexes.firstItem ( )
Index Indexes.item ( index: any )
Index Indexes.itemByID ( id: number )
Index Indexes.itemByName ( name: string )
Array of Index Indexes.itemByRange ( from: any, to: any )
Index Indexes.lastItem ( )
Index Indexes.middleItem ( )
Index Indexes.nextItem ( obj: Index )
Index Indexes.previousItem ( obj: Index )