3 Replies Latest reply on Nov 4, 2015 9:09 AM by carlm80163462

    Update Text Insets in Doc

    carlm80163462 Level 1

      Hi all,


      Just wondering if anyone knows if there's a similar call to UpdateBook() for a doc? I'm looking to update the text insets within a document, but the FM documentation seems to be telling me this is only possible to do if the doc is stored in a book.





        • 1. Re: Update Text Insets in Doc
          Mike-Hardy Level 3

          I've no experience of this, but there are some pointers to things that should work. I'm working from the C-library FDK. I believe I've correctly translated between its terminology and the ExtendScript terminology, but if you get problems, check the Scripting Guide for FrameMaker.


          You can loop through the text insets in a document, calling UpdateTextInset() on each. This is what I would do.


          You could instead try to update the text insets automatically when you open the file:

          • the document has a DontUpdateTextInsets property:
            • True if FrameMaker product doesn’t automatically update text insets when it opens the document
          • each text inset has a TiAutomaticUpdate property:
            • True if the inset is updated automatically.
            • TiAutomaticUpdate has no effect if the document’s DontUpdateTextInsets property is set to True
          • the openParams you can pass to Open() have an UpdateTextReferences property:
            • DoUserPreference: update text insets if the document property, DontUpdateTextInsets, is False.
            • DoYes: update text insets.
            • DoNo: don’t update text insets.
          • 2. Re: Update Text Insets in Doc
            frameexpert Level 4

            You should be able to do something like this:


            #target framemaker
            var doc = app.ActiveDoc;
            // Loop through the text insets in the document.
            ti = doc.FirstTiInDoc;
            while (ti.ObjectValid () === 1) {
                ti.UpdateTextInset (); // Update the inset.
                ti = ti.NextTiInDoc;



            • 3. Re: Update Text Insets in Doc
              carlm80163462 Level 1

              Excellent, thank you gentlemen! UpdateTextInset() is what I was looking for.