Link

A link to a placed file.

Methods:

addEventListener, checkIn, copyLink, editOriginal, extractLabel, getElements, goToSource, insertLabel, reinitLink, relink, relinkTextFragmentLink, removeEventListener, replaceWithOriginal, revealInBridge, revealInSystem, show, toSource, toSpecifier, unembed, unlink, update

Objects:

Boolean, Date, EditingState, EventListeners, Events, File, LinkMetadata, LinkResourceRenditionType, LinkStatus, Links, Number, Object, Preferences, String, VersionState

Preferences:

Preferences

Property Listing

Property

Type

Access

Description

assetID

String

readonly

The asset ID of the linked object.

assetURL

String

readonly

The asset URL of the linked object.

date

Date

readonly

The date and time the Link was created.

edited

Boolean

readonly

If true, indicates the linked object has been edited in the current document but the source file has not been updated.

editingState

EditingState

EditingState.EDITING_CONFLICT

EditingState.EDITING_LOCALLY

EditingState.EDITING_LOCALLY_LOCKED

EditingState.EDITING_NOWHERE

EditingState.EDITING_REMOTELY

EditingState.EDITING_UNKNOWN

readonly

The Version Cue editing state of the file.

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

filePath

String

File

readonly

The file path (colon delimited on the Mac OS). Can also accept: File.

id

Number

readonly

The unique ID of the Link.

index

Number

readonly

The index of the link in the links collection.

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

label

String

read/write

A property that can be set to any string.

linkResourceURI

String

readonly

The URI of the linked resource.

linkType

String

readonly

The file type of the linked object.

linkXmp

LinkMetadata

readonly

XMP data for the link source file.

links

Links Link

readonly

A collection of links.

name

String

readonly

The name of the Link.

needed

Boolean

readonly

If true, indicates a link to a full-resolution version of the source file is needed. If false, indicates the object is embedded.

parent

 

readonly

The linked object. Can return: Story, Graphic, Movie or Sound.

preferences

Preferences Preference

readonly

A collection of preferences objects.

properties

Object

read/write

A property that allows setting of several properties at the same time.

renditionData

LinkResourceRenditionType

LinkResourceRenditionType.ACTUAL

LinkResourceRenditionType.FPO

readonly

The rendition data of the link resource.

size

Number

readonly

The size of the Link file.

status

LinkStatus

LinkStatus.LINK_EMBEDDED

LinkStatus.LINK_INACCESSIBLE

LinkStatus.LINK_MISSING

LinkStatus.LINK_OUT_OF_DATE

LinkStatus.NORMAL

readonly

The status of the link.

versionState

VersionState

VersionState.LOCAL_NEWER

VersionState.LOCAL_PROJECT_MATCH

VersionState.NO_RESOURCE

VersionState.PROJECT_FILE_NEWER

VersionState.VERSION_CONFLICT

VersionState.VERSION_UNKNOWN

readonly

The Version Cue version state of the file.

Constants/Events

Name

Type

Access

Description

AFTER_ATTRIBUTE_CHANGED

String

readonly

Dispatched when the value of a property changes on this Link. This event bubbles. This event is not cancelable.

AFTER_DELETE

String

readonly

Dispatched after a Link is deleted. This event bubbles. This event is not cancelable.

AFTER_EMBED

String

readonly

Dispatched after a Link is embedded. This event bubbles. This event is not cancelable.

AFTER_MOVE

String

readonly

Dispatched after a Link is relocated from one object to another. This event bubbles. This event is not cancelable.

AFTER_NEW

String

readonly

Dispatched after a Link is created. This event bubbles. This event is not cancelable.

AFTER_UNEMBED

String

readonly

Dispatched after a Link is unembedded. This event bubbles. This event is not cancelable.

AFTER_UPDATE

String

readonly

Dispatched after a Link is updated. This event bubbles. This event is not cancelable.

BEFORE_DELETE

String

readonly

Dispatched before a Link is deleted. This event bubbles. This event is cancelable.

BEFORE_EMBED

String

readonly

Dispatched before a Link is embedded. This event bubbles. This event is cancelable.

BEFORE_MOVE

String

readonly

Dispatched before a Link is relocated from one object to another. This event bubbles. This event is cancelable.

BEFORE_UNEMBED

String

readonly

Dispatched before a Link is unembedded. This event bubbles. This event is cancelable.

BEFORE_UPDATE

String

readonly

Dispatched before a Link is updated. This event bubbles. This event is cancelable.

Method Listing

EventListener addEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Adds an event listener.

Parameter

Type

Description

eventType

String

The event type.

handler

File

JavaScriptFunction

The event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

undefined checkIn (versionComments:String, [forceSave:Boolean=Boolean])

Check in to Version Cue.

Parameter

Type

Description

versionComments

String

The comment for this version (Optional)

forceSave

Boolean

Forcibly save a version (Optional)

(default: false)

undefined copyLink (to:File, versionComments:String, [forceSave:Boolean=Boolean])

Copies the link file to the specified location.

Parameter

Type

Description

to

File

The file or folder to which to copy the file.

versionComments

String

The comment for this version. (Optional)

forceSave

Boolean

If true, forcibly saves a version. (Optional)

(default: false)

undefined 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.

Parameter

Type

Description

key

String

The key.

Link getElements ()

Resolves the object specifier, creating an array of object references.

undefined goToSource ()

Opens the source file of the link in InDesign for SharedContent links.

undefined insertLabel (key:String, value:String)

Sets the label to the value associated with the specified key.

Parameter

Type

Description

key

String

The key.

value

String

The value.

undefined reinitLink (linkResourceURI:String)

Experimental: Reinitialize the link to a new uri

Parameter

Type

Description

linkResourceURI

String

Resource URI to relink.

undefined relink (to:Varies File String)

Points the link to a new source file.

Parameter

Type

Description

to

File

String

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

undefined relinkTextFragmentLink (linkResourceURI:String, name:String)

Experimental: Relink the text fragment link to a new uri

Parameter

Type

Description

linkResourceURI

String

Resource URI to relink to.

name

String

The tag name for the key. (Optional)

Boolean removeEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Removes the event listener.

Parameter

Type

Description

eventType

String

The registered event type.

handler

File

JavaScriptFunction

The registered event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

undefined replaceWithOriginal ()

Experimental: Download the original asset and replace FPO with it.

undefined revealInBridge ()

Opens Adobe Bridge and selects the source file of the link.

undefined revealInSystem ()

Opens the file system to the folder that contains the source file of the link, and selects the file.

undefined show ()

Selects the link.

String toSource ()

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

String toSpecifier ()

Retrieves the object specifier.

undefined unembed (to:File, versionComments:String, [forceSave:Boolean=Boolean])

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.

Parameter

Type

Description

to

File

The folder to which to copy the unembedded file. (Optional)

versionComments

String

The comment for this version. (Optional)

forceSave

Boolean

If true, forcibly saves a version. (Optional)

(default: false)

undefined unlink ()

Embeds the source file in the document.

Link update ()

Updates the link if the source file has been changed.

Object of

Event.parent

EventListener.parent

LinkMetadata.parent

MutationEvent.parent

Preference.parent

Movie.itemLink

Sound.itemLink

Image.itemLink

EPS.itemLink

PDF.itemLink

WMF.itemLink

PICT.itemLink

Graphic.itemLink

ImportedPage.itemLink

Story.itemLink

XmlStory.itemLink

Return

InsertionPoint.createTextFragmentLink()

Link.getElements()

Links.anyItem()

Links.everyItem()

Links.nextItem()

Links.previousItem()

Links.itemByID()

Links.item()

Links.[]()

Links.itemByName()

Links.itemByRange()

Links.firstItem()

Links.lastItem()

Links.middleItem()

Link.update()