Skip to main content
Inspiring
November 12, 2022
Question

everyitem().update() not work during script

  • November 12, 2022
  • 8 replies
  • 1001 views

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

This topic is closed to new replies. Start a new post to keep the conversation going.

8 replies

brian_p_dts
Community Expert
Community Expert
January 11, 2023

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. 

Inspiring
January 11, 2023

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.

Community Expert
January 11, 2023

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/suggestions/38218423-scripting-graphiclayeroptions-changing-visibil

 

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 )

Inspiring
November 12, 2022

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

Inspiring
November 15, 2022

nobody for resolve this problem?

Inspiring
November 15, 2022

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();