2 Replies Latest reply on Jan 21, 2017 3:06 AM by K.Daube

    FA_Note_PostActiveDocChange - strange happening

    K.Daube Level 2

      Dear friends,

      In my script I have a Notify function to react on certain events.
      I have now discovered that FA_Note_PostActiveDocChange triggers although I have only one file open.
      Notify is invoked after leaving a function (which works on the document) and just climbing up the return ladder:

      Leaving HandleCalcMarkers
      Leaving Command
      FA_Note_PostActiveDocChange triggered


      FA_Note_PostActiveDocChange is not explained in the FDK reference. Adobe FrameMaker Scripting Guide only mentions it: (Constants.FA_Note_PostActiveDocChange int Value: 105).

      My understanding of this constant is that it triggers when I switch from one open document to another. I do not understand why it can trigger with only one document open.

      Although this behaviour does not create (as far as I see) any negative effect in the script, I'm suspicious...

        • 1. Re: FA_Note_PostActiveDocChange - strange happening
          Wiedenmaier Level 3

          Hi Klaus,


          AFAIK some pods and Dialog are based on FM documents. On possible explanation could be switching from one pod back to the document could fire this event.

          Check sparm. If I remember correctly in such case sparm is empty.



          • 2. Re: FA_Note_PostActiveDocChange - strange happening
            K.Daube Level 2

            Thanks, Markus, for this tip!


            In the meantime I have discovered that Constants.FA_Note_PostActiveDocChange is also 'triggered' by inserting a new row into a table. To there may be many cases in which this is event is triggered.


            Unfortunately there is no difference between the information in Notify for real document and change and these pseudo-changes:

            Notify triggered iNote= 105 sParm= null iParm= 0


            So how to verify a real change of document?

                case Constants.FA_Note_PostActiveDocChange:   // 105 active document has changed
                  if (object.Name !== glbl.oCurrentDoc) {
                    UpdateDialogues (object);

            This seems to work.