Adobe InDesign CS6 (8.0) Object Model JS: Assets

InDesign CS6

Class

Assets

 A collection of object library assets.

QuickLinks

[], 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

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

ParameterTypeDescription
indexnumberThe index.

Asset anyItem ()
Returns any Asset in the collection.

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

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

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

Asset item (index: varies)
Returns the Asset with the specified index or name.

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

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

ParameterTypeDescription
idnumberThe ID.

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

ParameterTypeDescription
namestringThe name.

Array of Asset itemByRange (from: varies, to: varies)
Returns the Assets within the specified range.

ParameterTypeDescription
fromAsset
Long Integer
String
The Asset, index, or name at the beginning of the range. Can accept: Asset, Long Integer or String.
toAsset
Long Integer
String
The Asset, index, or name at the end of the range. Can accept: Asset, Long Integer or String.

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

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

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

ParameterTypeDescription
objAssetThe Asset whose index comes before the desired Asset.

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

ParameterTypeDescription
objAssetThe index of the Asset that follows the desired Asset.

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

Element of

Library.assets

Jongware, 28-Apr-2012 v3.0.3hContents :: Index