Adobe InDesign CS4 (6.0) Object Model JS: CrossReferences

InDesign CS4

Class

CrossReferences

 A collection of cross references.

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

CrossReference [] (index: number)
Returns the CrossReference with the specified index.

ParameterTypeDescription
indexnumberThe index.

CrossReference add (referencedTopic: Topic, crossReferenceType: CrossReferenceType[, customTypeString: string][, withProperties: Object])
Creates a new cross reference.

ParameterTypeDescription
referencedTopicTopicThe topic that the cross reference points to.
crossReferenceTypeCrossReferenceType:
CrossReferenceType.SEE_OR_ALSO_BRACKET
CrossReferenceType.SEE
CrossReferenceType.SEE_ALSO
CrossReferenceType.SEE_HEREIN
CrossReferenceType.SEE_ALSO_HEREIN
CrossReferenceType.CUSTOM_CROSS_REFERENCE
CrossReferenceType.CUSTOM_CROSS_REFERENCE_BEFORE
CrossReferenceType.CUSTOM_CROSS_REFERENCE_AFTER
The cross reference type.
customTypeStringstringThe custom string to use in the cross reference. Valid only for custom cross reference types. (Optional)
withPropertiesObjectInitial values for properties of the new CrossReference (Optional)

CrossReference anyItem ()
Returns any CrossReference in the collection.

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

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

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

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

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

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

ParameterTypeDescription
idnumberThe ID.

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

ParameterTypeDescription
namestringThe name.

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

ParameterTypeDescription
fromCrossReference
Long Integer
String
The CrossReference, index, or name at the beginning of the range. Can accept: CrossReference, Long Integer or String.
toCrossReference
Long Integer
String
The CrossReference, index, or name at the end of the range. Can accept: CrossReference, Long Integer or String.

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

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

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

ParameterTypeDescription
objCrossReferenceThe CrossReference whose index comes before the desired CrossReference.

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

ParameterTypeDescription
objCrossReferenceThe index of the CrossReference that follows the desired CrossReference.

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

Element of

Topic.crossReferences

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