3 Replies Latest reply on Nov 19, 2014 11:59 PM by Laubender

    Paragraph Style override attributes

    DerKäse

      Hello all,

       

      I'm scripting for InDesign, and many of the paragraph and character instances have "styleOverriden" set to true. Is there a way to get all the overridden properties? Or do I need to get the paragraphStyle instance associated with the paragraph item, and literally check for each and every property that is different?

       

      Thanks all!

        • 1. Re: Paragraph Style override attributes
          Laubender Adobe Community Professional & MVP

          Hm, very unfortunate. Your document seems to be a mess…

           

          You really have to check every single character. In case of empty text frames or empty cells in tables even the one and only insertion point present. Maybe it's "enough" to check textStyleRanges, but in case of GREP Styles and/or Nested Styles in your paragraphs, even that could be a problem.

           

          Without seeing the actual document it's very hard to suggest something.

           

          To see, if a single insertion point, a single character or a text style range is overridden, you could check for:

           

          styleOverridden

           

          But this is not giving you the details, only a true or false on the fact.

           

          And of course, there might be good reasons (from the designer's point of view!) that a paragraph style or a character style is overwritten. How to account to that is also a question, that cannot be answered easily (or at all using a script).

           

          Uwe

          • 2. Re: Paragraph Style override attributes
            DerKäse Level 1

            Ah cool. Thanks a bunch for your reply! So, if I'm understanding this correctly, there is no specific property I can access on ParagraphStyle or CharacterStyle that'll give me all the overridden properties. I can only use "styleOverride" to check whether there is an override or not, correct?

            • 3. Re: Paragraph Style override attributes
              Laubender Adobe Community Professional & MVP

              Basically yes, you have to look at every character or insertion point to get the properties that are overridden, if you compare them to the applied character style and applied paragraph style. It will get really nasty, if there are a lot of GREP Styles applied. Or nested styles or nested line styles…

               

              But Jongware and Marc Autret once found another method "under the hood" (not available in the GUI for the ordinary user) to visually depict, if there are style overrides ("local formatting"):

               

              For that see:

              Marc Autret

              Show Local Formatting in InDesign CS4/CS5

              May 10, 2010
              Indiscripts :: Show Local Formatting in InDesign CS4/CS5

               

              Marc Autret

              The Hidden Way to Highlight Styles

              May 10, 2012

              Indiscripts :: The Hidden Way to Highlight Styles

               

              Uwe