Adobe InDesign CS (3.0) Object Model JS: Link

InDesign CS

Class

Link

 A link to a placed file.

QuickLinks

editOriginal, extractLabel, insertLabel, relink, show, unembed, unlink, update

Hierarchy

Graphic | Movie | Sound | Story
Link

Properties

PropertyTypeAccessDescription
assetEtagstring readonlyThe asset etag of the linked object.
assetID Array of
Longs
Strings
readonlyThe asset ID of the linked object. Can return: Array of Strings or Longs.
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.
filePathFile readonlyThe full path to the file.
idnumber readonlyThe unique ID of the Link.
indexnumber readonlyThe index of the link in the links collection.
labelstring r/wA property that can be set to any string.
linkTypestring readonlyThe file type of the linked object.
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 readonlySize of the file
statusLinkStatus:
LinkStatus.NORMAL
LinkStatus.LINK_OUT_OF_DATE
LinkStatus.LINK_MISSING
LinkStatus.LINK_EMBEDDED
readonlyThe status of the link.

Methods

Instances

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.

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: File)
Points the link to a new source file.

ParameterTypeDescription
toFileThe full path name of the new source file.

void show ()
Selects the link.

void unembed ([to: File])
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)

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

Movie.itemLink

PDF.itemLink

PICT.itemLink

Sound.itemLink

Story.itemLink

WMF.itemLink

Return

Link Link.update ()

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