3 Replies Latest reply on Jul 15, 2010 5:26 AM by JETalmage

    for loop open files and add reduced size to a layer in a file

    J4e8a16n Level 1

      Hi,

       

      I have a lot of  countries flags in svg files.

       

      A common usefull script would be,

       

       

      FOR

      Open svg files in a folder

      Reduce the file setup  to a smaller size

      Save art in a file as a layer

      Until all of them are collected in layers.

       

       

      Fortunately this could already exist...

       

       

      JPD

        • 1. Re: for loop open files and add reduced size to a layer in a file
          JETalmage Level 6

          ALWAYS state what version you are using.

           

          Reduce the file setup  to a smaller size

           

          What do you mean by "file setup"? If you mean Document Setup, the version you are using makes a difference.

           

          Save art in a file as a layer

           

          What does this mean, to "save art as a Layer"?  All artwork resides on a Layer or multiple Layers.

           

          Until all of them are collected in layers.

           

          Again not clear what you are trying to do. Are you wanting each flag to be on its own Layer in one file? Each Flag as a separate document?

           

          Read up on Actions. Most of what you seem to be describing can be done with an Action, and Actions can be run in Batch Mode on a folder full of files.

           

          JET

          1 person found this helpful
          • 2. Re: for loop open files and add reduced size to a layer in a file
            J4e8a16n Level 1

            Hi,

             

            I am sorry, I posted on the wromng forum.

             

            I will repost on Illustrator scripting taking you questions in consideration.JPD

            • 3. Re: for loop open files and add reduced size to a layer in a file
              JETalmage Level 6

              There's nothing wrong with asking questions about AI scripting here. But scripts have to be unambiguous. A script has to "know" exactly what you are trying to do.

              In single-Artboard versions of Illustrator, the Artboard size cannot be addressed and changed by scripting. That's one reason why it's important to state your version.

               

              Generally speaking, there is usually no need to resort to scripting for things that can be addressed in the normal UI, because most of those commands and functions can be invoked by simply recording a macro (Action). Performing a batch operation like it sounds like you are describing is likely such a situation.

               

              Much of what can be addresed by Actions is not addressable by script. Much of what can be done by script cannot be done by an Action. But when it can be, recording an Action is much less tedious than scripting.

               

              JET