• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

everyitem().update() not work during script

Explorer ,
Nov 12, 2022 Nov 12, 2022

Copy link to clipboard

Copied

hi

since few week i work with your collaboration on a script for open and update each link by recursion in my job file.

 

i have learn how to try to write a script with you, actually script is finish and correclty writed, but not work, because we have a doubt about this function everyitem().update()  can work during the script

i share with you a test file for indd22, with the script

https://www.dropbox.com/sh/afw1vrmu989kdc7/AABtLOI-bZtGOcXbv9lW6M5ea?dl=0

 

I can also highlight a compatibility problem between illustrator and indisign concerning the updating of links between them. randomly (in the case of the lemon file, if you make changes in the ai file), you can either see the lemon in the final assembly, or a white square. and if you break the link and paste the watermark from illustrator directly into indesign, you no longer have this problem (at least for now)

 

2 programmers came to me, both telling me that the script should work, and that there is no reason, unless the api is not working correctly.

now I've been getting worked up about this script for several weeks, and two professionals have passed on it. I would like adobe support to take a closer look at my problem, because that's why there is a scripting forum?.... I know that telephone support is not competent at all.

we really think that updating links during the script is not done properly.

once the script is finished, I have an alert window that opens, in the background; the file looks ok, but when I click on OK, to really end the script, the outdated link symbol is put in place, and when I open the links, it is not up to date etc. ..

Thank you for your help, because I can't take it anymore. And I've spent too long to give up

TOPICS
Scripting

Views

553

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
Explorer ,
Nov 12, 2022 Nov 12, 2022

Copy link to clipboard

Copied

I don't know if it is possible to automate with an external solution to indesign, while coupling it with scripts to run on indesign

in fact the script must stop after each line of update, and restart after

Votes

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
Explorer ,
Nov 15, 2022 Nov 15, 2022

Copy link to clipboard

Copied

nobody for resolve this problem?

Votes

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
Explorer ,
Nov 15, 2022 Nov 15, 2022

Copy link to clipboard

Copied

if i do separatly this script it work, but this script include in an other not work

var doc=app.activeDocument;
doc.links.everyItem().update();

Votes

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
Explorer ,
Nov 15, 2022 Nov 15, 2022

Copy link to clipboard

Copied

on the other hand if I open all my document suite and I do the following code

 

var size = app.documents.length;
while (app.documents.length >0){
    for (var i= app.documents.length ; i>0 ; i--){
var doc=app.activeDocument;
doc.links.everyItem().update();
doc.save();
doc.close();
}}

 

and that I make sure that the documents are processed from the furthest to the nearest, and well my documents will not be up to date when reopening

Votes

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
Explorer ,
Nov 24, 2022 Nov 24, 2022

Copy link to clipboard

Copied

hello, thank you for not participating in this post. I can understand your annoyance at my stubborn questions, but when you work with a sh***t language and sh***t functions are more limited. You should have been happy that I told you about the incompatibility between adobe illustrator and adobe indesign, which I believe are part of the same company.

and about the everyitem().update() function that can't work in a looped script, no one being able to explain it like a child.

I was taken out full of phony reproaches on my way of organizing my files, or others, but in the end, I would have spent several on a problem of sh***t related to the api, and without benefiting from real advice "professional"

I'm not even talking about adobe support, which I've used apl at least 20 times, and including about ten remote controls, they're simply incapable

senior support means what it means, it's retired support..

Votes

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
Community Expert ,
Jan 11, 2023 Jan 11, 2023

Copy link to clipboard

Copied

Hi @laurence roussel12011930 ,

I'm absolutely not sure what's going on in your specific case, but it could be perhaps this issue:

 

Scripting | graphicLayerOptions : Changing visibility of graphicLayer will change ID number of placed graphic
Uwe Laubender, Jul 24, 2019

https://indesign.uservoice.com/forums/913162-adobe-indesign-sdk-scripting-bugs-and-features/suggesti...

 

Tried to download your sample, but there is no file behind the link.

If you want to make an InDesign document available please include the unchanged placed and linked graphic file plus the changed one. So let's see. If I'm right with my assumption there should be a workaround.

 

Regards,
Uwe Laubender
( Adobe Community Expert )

Votes

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
Community Expert ,
Jan 11, 2023 Jan 11, 2023

Copy link to clipboard

Copied

everyItem().update() will fail if an image is missing. When doing batch updates, I first try everyItem().update() wrapped in a try/catch, and if we go to catch, then I iterate through everyItem().getElements() and check the status before deciding what to do. 

Votes

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
Explorer ,
Jan 11, 2023 Jan 11, 2023

Copy link to clipboard

Copied

LATEST

hello, I'm really sorry, I carelessly dropped the case with the jsx method, which in my opinion is real sh**t, with bugger functions that everyone finds perfect, and therefore the technical support of adobe does not even want not hear about....

 

since I work with the python method, our code is perfect, but we are still faced with an aberration of adobe..... adobe crashes during the pdf export, we don't know why, but it crashes without any error message, so we are doing bits of code to finish crashing indesign properly and then reopen it and start again until we get a successful pdf. because that's the joke, that's when it crashes, if I manually restart the export, it works on the second attempt....

 

in short, real sh*t in which I unfortunately invested too much time and on which I depend technically.

Votes

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