5 Replies Latest reply on Mar 10, 2014 11:17 AM by mmargeta

    Invoke Save Content on Assigned TextFrame

    mmargeta Level 1

      Hi,

       

      I'm trying to solve one situation... when assigned story is in status "In use and out of date". This one is quite disturbing for client (even more for developer) and could lead to unwanted direction like - getting back the old content and loosing any modification which you entered. If you want to reproduce it, it is very easy:

      1. Create incopy assigned text frame

      2. Save it, save document

      3. Check Out the Story

      4. Enter some content

      5. Save document

      --- at this point everything is cool and status of Story is "In Use"

      6. Enter content and hit "UNDO"

      --- at this point you get "In Use and Out of Date" status

       

      in use and out of date.png

      One solution to solve this is that you just hit Save and Assignment is "In use" status or you could do Save Content from Edit->InCopy menu or from "right click on text frame" pop-up menu just for that Story.

       

      Now, the question is... is there a solution to do "Save Content" by scripting... no metter what is selected at that point. Something like:

      For (Browse through all Assignments)

      --- If (Assignment is in status "In use and out of date")

      --- --- Do the Save Content for that Assignment

      --- End If

      Next

       

      And just to be clear - not to use the InvokeMenu method.

       

      Thanks!

      Marko

        • 1. Re: Invoke Save Content on Assigned TextFrame
          Jump_Over Level 5

          Hi Marko,

           

          There are two reasons of assigment story "out of date" status (shown to ID user):

          1. InDesign editor made modifications,  SAVE's and UNDO's ==> and save contents updates this

          2. InCopy editor made modifications ==> and update assigment updates this.

           

          First case is rewriting a file with contents from InDesign but second is rewriting contents in InDesign from a file.

          Looking for defense against FIRST you can destroy SECOND.

           

          So better way is to explain to InDesign editor how important is he and what UNDO does mean

          Do you agree...?

           

          Jarek

          • 2. Re: Invoke Save Content on Assigned TextFrame
            mmargeta Level 1

            Hi Jarek,

             

            I agree that "out of date" status is very needed and shows to client if the change is made to TextFrame... but take a look again in that little icon over the frame (my screenshot)...

             

            The icon says - "In use and out of date"... this is situation from InDesign which you can reproduce without another user doing check out/check in in InCopy. So - only you and nobody else. The icon means that you are editing the content of the frame and in the same time - your content needs an update?!

             

            Just to mention that this situation I couldn't reproduce in InCopy. Here you will find very simple explanation about this icon and some comments.

            http://incopysecrets.com/the-strange-case-of-the-editing-and-out-of-date-status.php/commen t-page-1

             

            And because you can not be absolutely sure that client will not hit Save and Undo, I would like to implement in my editorial system workflow, a peace of code which will check the assignments and when spot that status -> do something... alert, message, save content, save doc or else...

             

            I would appreciate if someone could provide me even with little help on how to catch this status in InDesign.

             

            Regards,

            Marko

            • 3. Re: Invoke Save Content on Assigned TextFrame
              Jump_Over Level 5

              Hi,

               

               

              mmargeta wrote:

               

              ...

              Now, the question is... is there a solution to do "Save Content" by scripting... no metter what is selected at that point. Something like:

              For (Browse through all Assignments)...

               

              You can edit one story at time but you are going to process all assignments.

              Thats why i wrote my warning.

               

              To save contents of edited story with mentioned status you can call export() to file matched in story.itemLink

               

              Jarek

              • 4. Re: Invoke Save Content on Assigned TextFrame
                mmargeta Level 1

                Hi Jarek,

                 

                in that case - that looks promising . Sorry for misunderstanding... and thank you for your quick reply. I'll give it a try an let you know.

                 

                Best regards,

                Marko

                • 5. Re: Invoke Save Content on Assigned TextFrame
                  mmargeta Level 1

                  At the end...

                  Export did the trick but had to do unlink first... something like this:

                   

                  'CheckedOut and OutOfDate

                  If myStoryStatus = idLockStateValues.idCheckedOutStory And myStoryLink.Status = idLinkStatus.idLinkOutOfDate And myStoryLink.Edited = True Then

                     Dim ExportFilePath As String = myStoryLink.FilePath

                     myStoryLink.Unlink()

                     myStory.Export("InCopy Document", ExportFilePath, False, , , True)

                     myStory.CheckOut()

                  End If

                   

                  Regards,

                  Marko