Updating placed File

Community Beginner ,
Sep 09, 2021 Sep 09, 2021

Copy link to clipboard

Copied

Hi,

I need to update the placed file which gets modified externally. For that I need to get id/label/link of the placed file. Please let me know what's the method to do it.

Sample code:

if (app.selection[0]) {
app.selection[0].place(File(myPDFFile);
var mySpread = app.activeDocument.spreads[0].place(File(myPDFFile));
}

TOPICS
How to, Scripting, SDK

Views

36

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , Sep 09, 2021 Sep 09, 2021
There is method update() for the link of the placed graphic. When the frame holding the graphic is selected: app.selection[0].graphics[0].itemLink.update(); Also check method relink(). See DOM documentation compiled by Gregor Fellenz: https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Link.html Regards, Uwe Laubender ( ACP )

Likes

Translate

Translate
Adobe Community Professional ,
Sep 09, 2021 Sep 09, 2021

Copy link to clipboard

Copied

LATEST

There is method update() for the link of the placed graphic.

When the frame holding the graphic is selected:

app.selection[0].graphics[0].itemLink.update();

Also check method relink().

 

See DOM documentation compiled by Gregor Fellenz:

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Link.html

 

Regards,
Uwe Laubender

( ACP )

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines