3 Replies Latest reply on Aug 21, 2014 6:55 AM by pixxxel schubser

    Square meter info

    d.sandberg Level 1

      Is it passable the see the square meters (m2) of a dokument in a easy way? I don't want to manually count hundred of documents...

        • 1. Re: Square meter info
          pixxxel schubser Level 5

          How is formatted your (m2) ?

          If is not formatted, you can use a paragraph style with grep style:

          \bm2\b

          perhaps with red color character style (only to see every found)

           

          If you want to format the m(2), you can use a different grep style e.g.

          (?<=\bm)2\b

          character style: position superscript (+perhaps a color)

           

          (And sorry for my bad english)

           

          Have fun

           

          • 2. Re: Square meter info
            Sajeev Sridharan Level 4

            You can use the below code to count the number of square meter in multiple Indesign documents:

             

            var InddFile = File.openDialog ("Choose InDesign files to count square meter..." , "*.indd", true);
            for (var f = 0; f < InddFile.length; f++)
            {
                count=0;
                var myInddFile = app.open(File(InddFile[f]));
                var myDoc = app.activeDocument; 
                app.findGrepPreferences = app.changeGrepPreferences = null;
                app.findGrepPreferences.findWhat = "m2";
                found = app.activeDocument.findGrep (true);
                for (i = 0; i < found.length; i++)
                {
                    if(found[i].characters[1].position.toString() == "SUPERSCRIPT")
                    {
                        count++;
                    }
                }
                app.findGrepPreferences = app.changeGrepPreferences = null;
                alert("File Name:\t" + myDoc.name + "\rSq. Mtr Count:\t" + count);
            }
            

             

             

            Vandy

            • 3. Re: Square meter info
              pixxxel schubser Level 5

              Sajeev Sridharan,

               

              it seems to be nice. But IMHO this is a dangerous solution without to know what the contents of the documents is.

              Look here for different examples of M2 (and thats not all):

               

              M2 - Wikipedia, the free encyclopedia

               

              Waiting for more infomation from d.sandberg seems to be useful.