6 Replies Latest reply on Sep 30, 2009 11:33 AM by Tesla3D

    6.0.4 Update - fixes nested ID file links info

    SuperMacGuy Level 2

      Hi all,

      I got a message from an Adobe development manager letting me know of the 6.0.4 update. Specifically they have (almost) rectified the issue where you could not find out about graphic links inside of ID docs that were placed inside another ID document. The solution is that the placed ID document has an attribute of "links" (list/array) which can then be queried for the number of images and their information. I said "almost" because in a quick test, and verification with the Adobe rep, the Status of a graphic in the place ID file will not show as "normal" - it only shows its status as "out of date" or "link missing". My rep says this may need to wait for a later (6.0.5?) update.

      There may be other fixes but this is one of two I really needed. I wanted to let everyone know, I know there are some other people waiting for this.

       

      Here's some Applescript of how I queried some links in nested ID files:

       

      --comment out as needed

      tell application "Adobe InDesign CS4"

      tell document 1

       

      set subLinkTable to {}

       

      set topLinkStatii to status of every link

      if topLinkStatii contains link missing then --link missing is constant

      return "missing top level links"

      end if

       

       

      repeat with L in every link

      set linkCount to count of links of L

       

      repeat with i from 1 to linkCount

      copy ((status of link i of L) as string) & "-" & (name of link i of L) to end of subLinkTable

      if status of link i of L is link missing then

      return "missing 2nd level links"

      end if

      end repeat

       

      end repeat

       

      return "great success"

       

      end tell

      end tell

       

       

      Here's a javascript (not written by me) that does some similar querying:

       

      ---------------------
      // Iterate through all the links of container document
      linksLength = theDoc.links.length;
      for (i=0 ; i< linksLength ; i++)
      {
      var curLink = theDoc.links[i];
      alert("Top level link: " + curLink.name);
      childLinksLength = curLink.links.length;
       
      // Iterare through the child links of the placed INDD file
      for (j=0; j < childLinksLength; j++)
      {
      alert("Child link: " + curLink.links[j].name);
      }
      }
      ---------------------

       

       

      Ciao,

      Chris

        • 1. Re: 6.0.4 Update - fixes nested ID file links info
          Tesla3D Level 1

          I also noticed in 6.0.4 that the Update command is no longer needed after a Relink. In all previous versions an Update was needed after a Relink, but in 6.0.4 the Relink command is all you need. Update doesn't work in 6.0.4 anyway (errors). Fortunately, it's no longer necessary.

          • 2. Re: 6.0.4 Update - fixes nested ID file links info
            Andreas Jansson Level 2

            But this is a breaking change!!!

            Customers from near and far are reporting errors in our scripts...

             

            This can't be a deliberate error from Adobe, right? I'd call it a bug, since it breaks old scripts...

            • 3. Re: 6.0.4 Update - fixes nested ID file links info
              SuperMacGuy Level 2

              Well what exactly is breaking?

              From my perspective, it is fixing what should have been working from the start in CS4, and what WAS working correctly, but differently, in CS3. In CS3, a placed ID document would be able to show it's links and link status when queried (they would all show up as top-level links, not nested). In CS4, no information was returned at all about sub-links. So for our workflow, we could not detect missing images at all; we had to rely on an operator to check all links before outputting files. Now Adobe is fixing it, but it's clearly different than the old (CS3) implementation. I agree it causes us to change scripts; but that does happen from time to time.

              • 4. Re: 6.0.4 Update - fixes nested ID file links info
                AdobeScripts Level 3

                SuperMacGuy wrote:

                 

                Well what exactly is breaking?

                From my perspective, it is fixing what should have been working from the start in CS4, and what WAS working correctly, but differently, in CS3. In CS3, a placed ID document would be able to show it's links and link status when queried (they would all show up as top-level links, not nested). In CS4, no information was returned at all about sub-links. So for our workflow, we could not detect missing images at all; we had to rely on an operator to check all links before outputting files. Now Adobe is fixing it, but it's clearly different than the old (CS3) implementation. I agree it causes us to change scripts; but that does happen from time to time.

                 

                if something works fine - return more information - and in new version it stop working - return less informations - it is a bug

                 

                robin

                 

                www.adobescripts.co.uk

                • 5. Re: 6.0.4 Update - fixes nested ID file links info
                  Andreas Jansson Level 2

                  I've never been working with placed ID documents so I can't comment that. My concern is ordinary images.

                   

                  The thing that's breaking is the relinking of images in scripts, previously relying on an update and an assignment of the result of the update to a new variable, like this:

                   

                              lnk.relink(File(myImagesPath + '/' + newTrail));
                              var modifiedLink = lnk.update();
                              picture = modifiedLink.parent;

                   

                  A try/catch, not to disturb customers still in CS3 or not yet updated should take care of the error now.


                  > I agree it causes us to change scripts; but that does happen from time to time.

                   

                  Well, major versions of course, but I don't agree that it happens time to time. Absolutely not. This is the first time ever that an ordinary minor (free) update has caused any of our scripts to fail (and we have quite a lot of code, doing scripting since CS2). We might just be lucky but I'd say that Adobe has been very good at not disturbing code by updates, and my guess is that the effect of this update was taken into account when released.

                  • 6. Re: 6.0.4 Update - fixes nested ID file links info
                    Tesla3D Level 1

                    SuperMacGuy - I apologize for confusing your topic a bit. My post was loosely related (links), but didn't pertain to placed ID docs.

                     

                    Andrea Jansson - The Relink/Udate commands in 6.0.4 broke our existing scripts as well. By the way, I'm using AppleScript, but I took the same approach to fix it. Nest the Update command in a Try statement so earlier versions still work, and 6.0.4 won't kill your script. Most scripts that I widely distribute, I'll lock the script into a specified ID version (if version starts with "6.0.4"). If Adobe releases an update, I'll post a new script for that version. It's helped me avoid issues like this Links thing.

                     

                    Although surprises like this links issue can be frustrating, this seems like a change for the better. I never understood why Relinking also required the Update, when Relinking in the GUI did not. Scripting links in ID has had some hurdles lately, but I credit Adobe for sticking with it to get it right (even if that means minor script changes).

                     

                    Other link issues I've noticed... the Relink command in all versions of CS4 seems to only work with file objects now and not Strings as it did in previous versions, and Relinking anchored links (links within text flows) was also fixed in the 6.0.4 update.