5 Replies Latest reply on Aug 27, 2015 5:33 AM by tpk1982

    Need help in vector

    tpk1982 Level 4

      Hello friends,

       

      Is it possible to check the vector line stroke weight in indesign by using javascript? Thanks in advance.

       

      Regards,

      Karthi

        • 1. Re: Need help in vector
          BSKTCreation Level 2

          Here you go.

           

          alert(app.activeDocument.pageItems.item(0).strokeWeight);
          

           

          You can also check or change the properties of the fillColor, strokeColor, strokeType etc. from the pageItem.

           

          Brett

          • 2. Re: Need help in vector
            tpk1982 Level 4

            Hi Brett,

             

            Thanks for your reply. But i need to check the stroke weight of placed illustrator file. Not indesign pageitem. I don't know is it possible or not. Can you please explain in that angle?

             

            Thanks in advance.

             

            Regards,

            Karthi

            • 3. Re: Need help in vector
              Laubender Adobe Community Professional & MVP

              Hi Karthi,

              every placed Illustrator file on an InDesign page is a closed container. You cannot look into it directly using scripting with InDesign.

              However you can open the placed file by scripting in Illustrator (see bridgeTalk in the scripting documentation and elsewhere in this forum) and using Illustrator's own scripting engine to gather information of used paths.

               

              For scripting Illustrator see:

              Illustrator Scripting

               

              Uwe

              • 4. Re: Need help in vector
                BSKTCreation Level 2

                No worries Karthi.

                 

                The workflow I use for vectors in InDesign is open the Illustrator file, copy the vector and paste in InDesign (not placing), from there you have all the options open to you inside InDesign as it is now an InDesign vector (this can all be done via script as well).

                 

                I understand that this isn't what you're doing so Uwe's advice is going to be the best for you I think. Good luck!

                 

                Brett

                • 5. Re: Need help in vector
                  tpk1982 Level 4

                  Hi Brett and Uwe,

                   

                  Thanks for your suggestions. It is really useful.

                   

                  Regards,

                  Karthi