Adobe InDesign CS5 (7.0) Object Model JS: Index

InDesign CS5

Class

Index

 An index.

QuickLinks

addEventListener, capitalize, extractLabel, generate, getElements, importTopics, insertLabel, removeEventListener, removeUnusedTopics, toSource, toSpecifier, update

Hierarchy

Document
Index
Event | EventListener | IndexSection | MutationEvent | Topic

Properties

PropertyTypeAccessDescription
allTopicsArray of Topic readonlyThe topics in the specified index section.
eventListenersEventListeners readonlyA collection of event listeners.
eventsEvents readonlyA collection of events.
idnumber readonlyThe unique ID of the Index.
indexnumber readonlyThe index of the Index within its containing object.
indexSectionsIndexSections readonlyA collection of index sections.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
labelstring r/wA property that can be set to any string.
namestring r/wThe name of the Index; this is an alias to the Index's label property.
parentDocument readonlyThe parent of the Index (a Document).
propertiesObject r/wA property that allows setting of several properties at the same time.
topicsTopics readonlyA collection of index topics.

Methods

Instances

EventListener addEventListener (eventType: string, handler: varies[, captures: bool=false])
Adds an event listener.

ParameterTypeDescription
eventTypestringThe event type.
handlerFile
JavaScript Function
The event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

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

ParameterTypeDescription
capitalizationOptionIndexCapitalizationOptions:
IndexCapitalizationOptions.SELECTED_ENTRY
IndexCapitalizationOptions.INCLUDE_SUBENTRIES
IndexCapitalizationOptions.ALL_LEVEL_1_ENTRIES
IndexCapitalizationOptions.ALL_ENTRIES
The entry or entries to capitalize. (Optional) (default: IndexCapitalizationOptions.ALL_ENTRIES)

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

ParameterTypeDescription
keystringThe key.

Array of Story generate ([on: varies][, placePoint: Array of Measurement Unit (Number or String)][, destinationLayer: Layer][, autoflowing: bool=false][, includeOverset: bool=false])
Generates a new index story.

ParameterTypeDescription
onMasterSpread
Page
Spread
The spread or page on which to place the story. Can accept: Page, Spread or MasterSpread. (Optional)
placePointArray of Measurement Unit (Number or String)The coordinates of the upper left corner of the story bounding box, in the format [x, y]. (Optional)
destinationLayerLayerThe layer on which to place the story. (Optional)
autoflowingboolIf 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)
includeOversetboolIf 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.

ParameterTypeDescription
fromFileThe file from which to import the topics.

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

ParameterTypeDescription
keystringThe key.
valuestringThe value.

bool removeEventListener (eventType: string, handler: varies[, captures: bool=false])
Removes the event listener.

ParameterTypeDescription
eventTypestringThe registered event type.
handlerFile
JavaScript Function
The registered event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

void removeUnusedTopics ()
Removes all index topics that do not have any index entries.

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

Topic.parent

Used in:

Index Indexes.nextItem (obj: Index)

Index Indexes.previousItem (obj: Index)

Return

Array of Index Index.getElements ()

Index Indexes.[] (index: number)

Index Indexes.add ([withProperties: Object])

Index Indexes.anyItem ()

Array of Index Indexes.everyItem ()

Index Indexes.firstItem ()

Index Indexes.item (index: varies)

Index Indexes.itemByID (id: number)

Index Indexes.itemByName (name: string)

Array of Index Indexes.itemByRange (from: varies, to: varies)

Index Indexes.lastItem ()

Index Indexes.middleItem ()

Index Indexes.nextItem (obj: Index)

Index Indexes.previousItem (obj: Index)

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