2 Replies Latest reply on Sep 4, 2009 11:07 AM by Eric @ MCA

    [AS] Making "keep overrides" the default graphic layer option for all placed graphics?

    Eric @ MCA Level 3

      If I relink thisLink when it is missing, and update link option was set to keep overrides, everything is fine. But if it was set to application settings, I am in a world of hurt, because suddenly all my Unit numbers will show 1-32 piled on top of each other (all layers visible in Photoshop) or the wrong one (just one layer visible in Photoshop) or nothing at all!

       

      The catch-22 is that until I relink missing links, update link option only shows "unknown" as the result. Arrrgh?

       

      set myLinks to every link whose status = missing
      repeat with thisLink in myLinks
          get update link option of graphic layer options of parent of thisLink
              -->Returns "unknown" instead of "application settings" or "keep overrides"
          try
              set update link option of graphic layer options of parent of thisLink to "keep overrides"
              relink thisLink to newLinkPath
              update thisLink
          on error
              -->This always errors on the set update link option line
          end try
      end repeat

       

       

      Anyone know a way around this or should I just change my name to Yossarian?

       

      Thanks in advance,

      Eric.

        • 1. Re: [AS] Making "keep overrides" the default graphic layer option for all placed graphics?
          sstanleyau Level 4

          That looks like a nasty conundrum. Do you get the right value for update link option after you relink? If so, you might be best to relink, get the value, undo the relink, then set the value.

           

          --

          Shane Stanley <sstanley@myriad-com.com.au>

          AppleScript Pro Sessions <http://scriptingmatters.com/aspro>

          1 person found this helpful
          • 2. Re: [AS] Making "keep overrides" the default graphic layer option for all placed graphics?
            Eric @ MCA Level 3

            Well, I give you points for creativity! Unfortunately, relink is destructive and overwrites any info with the default (which in CS2 is application settings).

             

            What really kills me is that InDesign has some Sooper Seekrit internal list that only the Links palette knows about. So if you *manually* try and relink the document and then revert it, it automatically relinks against all the paths you've tried since launching it and therefore, the second time all the links show as linked and the process is non-destructive, unlike the "relink" command.


            Argh.

             

            I will think on it some more though. Thanks for your input!

             

            PS: Adobe apparently broke the ability to relink against a string in CS4 from what I can tell. In spite of the fact that the dictionary specifically lists alias or string or string (yes, says or string twice in the dictionary), only alias really seem to work.

             

            So...

             

            set newLinkFolder to "" & path to home folder & "Pictures:"

            set newLinkPath to newLinkFolder & name of thisLink

            try

            relink thisLink to newLinkPath

            on error

            display dialog "FAIL!"

            end try

            try

            relink thisLink to newLinkPath as alias

            on error

            display dialog "No fail. You'll never see this message!"

            end try