I understand that the declaration #targetengine "myEngineName" will be used for InDesign to remember global variables (information is found here: http://incom.org/post/89818 ).
However, this was not enough for him to remember global variables, as he still raises an error regarding the
imgs global variable:
Error Number: 30476
Error line: "if (imgs [i] .itemLink! = Null)" could not be completed because the object no longer exists.
... or something like that. I don't like this particular line in my code and seem to forget how the imgs global variable was created.
So I applied the try-catch statement and restored the
imgs variable and reduced the iterator in catch ... Although this
did solve the problem, why didnโt
#targetengine "myEngineName" solve the problem as intended?
Here is my code:
#target "InDesign" // this solves the "Error Number: 29446" problem
This is the only information I could find regarding this error: http://forums.adobe.com/thread/748419
EDIT -
I am sure the problem has something to do with the replaceWithNewImage function, because this error did not occur without this function, and then there was no need for a try-catch statement ...
source share