2 Replies Latest reply on Jul 11, 2015 11:55 AM by SFRIP

    pgfFmt.Start property not working


      Hello guys:


      I´ve tried this using FM 10 and FM 11 (unstructured), and it fails in both versions. The PgfFmt "Body" is shown as modified in FM (asterisk) but the Paragraph Designer shows the old Start property.


      I need to update the "Start" PgfFmt property. I am using a shared code that works with the rest of PgfFmt properties.

      source: (http://extendingframemaker.blogspot.com/2011/10/updating-paragraph-format.html)


      var doc = app.ActiveDoc;

      var tframe = doc.MainFlowInDoc.FirstTextFrameInFlow;


      var pgfFmt = doc.GetNamedObject(Constants.FO_PgfFmt, "Body");

      if (pgfFmt.ObjectValid) {

          pgfFmt.Start= Constants.FV_PGF_ANYWHERE;

          var formatFlags = Constants.FF_UFF_PGF | Constants.FF_UFF_REMOVE_EXCEPTIONS;

          doc.SimpleImportFormats (doc, formatFlags);



      The document is already saved in my HD, so it exists. What is wrong?



        • 1. Re: pgfFmt.Start property not working
          Russ Ward Level 4

          Hi SFRIP,


          I was able to confirm this behavior. It seems like a bug to me. Other paragraph properties apply correctly but this one does not. The only way I could get the Start property to apply was to iterate over all paragraphs and reapply the whole format:


          pgf = doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;
              if(pgf.Name == "Body")
              pgf = pgf.NextPgfInFlow;


          Hope that sample comes through OK. Incredibly, this forum editor continues to get harder to use.



          • 2. Re: pgfFmt.Start property not working
            SFRIP Level 1

            Thanks Russ, it works!!!


            And yes, the forum sometimes is hard to use.


            Regards and again thanks a lot!