Adobe InDesign CS4 (6.0) Object Model JS: Link

InDesign CS4

Class

Link

 A link to a placed file.

QuickLinks

checkIn, copyLink, editOriginal, extractLabel, getElements, insertLabel, relink, revealInBridge, revealInSystem, show, toSource, toSpecifier, unembed, unlink, update

Hierarchy

Graphic | Movie | Sound | Story
Link
LinkMetadata

Properties

PropertyTypeAccessDescription
assetEtagstring readonlyThe asset etag of the linked object.
assetIDstring readonlyThe asset ID of the linked object.
assetURLstring readonlyThe asset URL of the linked object.
dateDate readonlyThe date and time the Link was created.
editedbool readonlyIf true, indicates the linked object has been edited in the current document but the source file has not been updated.
editingStateEditingState:
EditingState.EDITING_UNKNOWN
EditingState.EDITING_NOWHERE
EditingState.EDITING_REMOTELY
EditingState.EDITING_LOCALLY
EditingState.EDITING_LOCALLY_LOCKED
EditingState.EDITING_CONFLICT
readonlyThe Version Cue editing state of the file.
filePathFile
string
readonlyThe file path (colon delimited on the Mac OS). Can also accept: File.
idnumber readonlyThe unique ID of the Link.
indexnumber readonlyThe index of the link in the links collection.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
labelstring r/wA property that can be set to any string.
linkTypestring readonlyThe file type of the linked object.
linkXmpLinkMetadata readonlyXMP data for the link source file.
namestring readonlyThe name of the Link.
neededbool readonlyIf true, indicates a link to a full-resolution version of the source file is needed. If false, indicates the object is embedded.
parentGraphic
Movie
Sound
Story
readonlyThe linked object. Can return: Story, Graphic, Movie or Sound.
propertiesObject r/wA property that allows setting of several properties at the same time.
sizenumber readonlyThe size of the Link file.
statusLinkStatus:
LinkStatus.NORMAL
LinkStatus.LINK_OUT_OF_DATE
LinkStatus.LINK_MISSING
LinkStatus.LINK_EMBEDDED
readonlyThe status of the link.
versionStateVersionState:
VersionState.VERSION_UNKNOWN
VersionState.PROJECT_FILE_NEWER
VersionState.LOCAL_PROJECT_MATCH
VersionState.LOCAL_NEWER
VersionState.VERSION_CONFLICT
VersionState.NO_RESOURCE
readonlyThe Version Cue version state of the file.

Methods

Instances

void checkIn ([versionComments: string][, forceSave: bool=false])
Check in to Version Cue.

ParameterTypeDescription
versionCommentsstringThe comment for this version (Optional)
forceSaveboolForcibly save a version (Optional) (default: false)

void copyLink (to: File[, versionComments: string][, forceSave: bool=false])
Copies the link file to the specified location.

ParameterTypeDescription
toFileThe file or folder to which to copy the file.
versionCommentsstringThe comment for this version. (Optional)
forceSaveboolIf true, forcibly saves a version. (Optional) (default: false)

void editOriginal ()
Opens the source file of the link in the default editor for the source file type.

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

ParameterTypeDescription
keystringThe key.

Array of Link 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.

void relink (to: any)
Points the link to a new source file.

ParameterTypeDescription
toFile
String
The full path name of the new source file. Can accept: File or String.

void revealInBridge ()
Opens Adobe Bridge and selects the source file of the link.

void revealInSystem ()
Opens the file system to the folder that contains the source file of the link, and selects the file.

void show ()
Selects the link.

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

string toSpecifier ()
Retrieves the object specifier.

void unembed ([to: File][, versionComments: string][, forceSave: bool=false])
Unembeds the source file. If no folder is specified, creates a link to the original source file; if a folder is specified, copies the file to the folder and creates a link to the copied file.

ParameterTypeDescription
toFileThe folder to which to copy the unembedded file. (Optional)
versionCommentsstringThe comment for this version. (Optional)
forceSaveboolIf true, forcibly saves a version. (Optional) (default: false)

void unlink ()
Embeds the source file in the document.

Link update ()
Updates the link if the source file has been changed.

Element of

EPS.itemLink

Graphic.itemLink

Image.itemLink

ImportedPage.itemLink

LinkMetadata.parent

Movie.itemLink

PDF.itemLink

PICT.itemLink

Sound.itemLink

Story.itemLink

WMF.itemLink

XmlStory.itemLink

Used in:

array of Link Links.itemByRange (from: any, to: any)

Link Links.nextItem (obj: Link)

Link Links.previousItem (obj: Link)

Return

Array of Link Link.getElements ()

Link Link.update ()

Link Links.[] (index: number)

Link Links.anyItem ()

Array of Link Links.everyItem ()

Link Links.firstItem ()

Link Links.item (index: any)

Link Links.itemByID (id: number)

Link Links.itemByName (name: string)

Array of Link Links.itemByRange (from: any, to: any)

Link Links.lastItem ()

Link Links.middleItem ()

Link Links.nextItem (obj: Link)

Link Links.previousItem (obj: Link)

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