1 Reply Latest reply on Jul 31, 2016 1:01 AM by Xarquol

    Update Design in InCopy CC

    Nick Passmore Level 1

      How can a script detect that an InCopy Assignment has updates pending from its parent InDesign document and how do you script applying the updated design to the InCopy file?

        • 1. Re: Update Design in InCopy CC
          Xarquol

          I had exactly the same question and in searching for the answer, found only your question. There does not appear to be any way in the Assignment or Document objects to determine that the open assignment needs updating, nor perform the update.

           

          But then I realised that since all we want to do is a "File->Update Design" in the UI, we can abuse its MenuAction to do just that, and also use it to determine if the update is required:

           

          // "Update Design" MenuAction. I found the non-localised key by running:
          // app.findKeyStrings("Update Design");
          var updateDesignMenuAction = app.menuActions.item("$ID/UpdateDesignTip");
          
          function isDesignOutOfDate() {
              // MenuItem for this will be greyed out until an update is required
              // and so the MenuAction will be disabled too until then.
              return updateDesignMenuAction.enabled;
          }
          
          function updateDesign() {
              if (isDesignOutOfDate()) {
                  updateDesignMenuAction.invoke();
              }
          }
          
          
          

           

          I still don't know if there's a way to be notified that the assignment file is out-of-date, but this is sufficient for my needs.