Adobe InDesign CS4 (6.0) Object Model JS: Asset

InDesign CS4

Class

Asset

 An object library asset.

QuickLinks

extractLabel, getElements, insertLabel, placeAsset, remove, select, toSource, toSpecifier

Hierarchy

Library
Asset

Properties

PropertyTypeAccessDescription
assetTypeAssetType:
AssetType.IMAGE_TYPE
AssetType.EPS_TYPE
AssetType.PDF_TYPE
AssetType.GEOMETRY_TYPE
AssetType.PAGE_TYPE
AssetType.TEXT_TYPE
AssetType.STRUCTURE_TYPE
AssetType.INDESIGN_FILE_TYPE
r/wThe type of object library asset.
dateDate readonlyThe date and time the Asset was created.
descriptionstring r/wThe description of the Asset.
idnumber readonlyThe unique ID of the Asset.
indexnumber readonlyThe index of the Asset within its containing object.
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 Asset.
parentLibrary readonlyThe parent of the Asset (a Library).
propertiesObject r/wA property that allows setting of several properties at the same time.

Methods

Instances

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

ParameterTypeDescription
keystringThe key.

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

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

ParameterTypeDescription
keystringThe key.
valuestringThe value.

Array of any placeAsset (on: any)
Places the asset in the specified document or text.

ParameterTypeDescription
onDocument
Text
The document or text object in which to place the asset. Can accept: Document or Text.

void remove ()
Deletes the Asset.

void select ([existingSelection: SelectionOptions=SelectionOptions.REPLACE_WITH])
Selects the object.

ParameterTypeDescription
existingSelectionSelectionOptions:
SelectionOptions.ADD_TO
SelectionOptions.REMOVE_FROM
SelectionOptions.REPLACE_WITH
The selection status of the Asset in relation to previously selected objects. (Optional) (default: SelectionOptions.REPLACE_WITH)

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

string toSpecifier ()
Retrieves the object specifier.

Used in:

array of Asset Assets.itemByRange (from: any, to: any)

Asset Assets.nextItem (obj: Asset)

Asset Assets.previousItem (obj: Asset)

Return

Array of Asset Asset.getElements ()

Asset Assets.[] (index: number)

Asset Assets.anyItem ()

Array of Asset Assets.everyItem ()

Asset Assets.firstItem ()

Asset Assets.item (index: any)

Asset Assets.itemByID (id: number)

Asset Assets.itemByName (name: string)

Array of Asset Assets.itemByRange (from: any, to: any)

Asset Assets.lastItem ()

Asset Assets.middleItem ()

Asset Assets.nextItem (obj: Asset)

Asset Assets.previousItem (obj: Asset)

Asset Button.store (using: Library[, withProperties: Object])

Asset EPS.store (using: Library[, withProperties: Object])

Asset FormField.store (using: Library[, withProperties: Object])

Asset GraphicLine.store (using: Library[, withProperties: Object])

Asset Group.store (using: Library[, withProperties: Object])

Asset Image.store (using: Library[, withProperties: Object])

Asset Library.store (using: Array of any[, withProperties: Object])

Asset Movie.store (using: Library[, withProperties: Object])

Asset Oval.store (using: Library[, withProperties: Object])

Asset PDF.store (using: Library[, withProperties: Object])

Asset PICT.store (using: Library[, withProperties: Object])

Asset PageItem.store (using: Library[, withProperties: Object])

Asset Polygon.store (using: Library[, withProperties: Object])

Asset Rectangle.store (using: Library[, withProperties: Object])

Asset Sound.store (using: Library[, withProperties: Object])

Asset TextFrame.store (using: Library[, withProperties: Object])

Asset WMF.store (using: Library[, withProperties: Object])

Asset XMLElement.store (using: Library[, withProperties: Object])

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