Highlighted

Mass edit different files

Community Beginner ,
Sep 17, 2020

Copy link to clipboard

Copied

Hi all,

 

I have received .ai files which are illustrations of  football/soccer shirts. (See image for an example) Each shirt has a number on the back side and there are 24 different shirts in total. For each shirt I would like to adjust the numbers on the back, so that I have a copy for numbers 1 up until 99 for each shirt, resulting in 24 * 99 = a lot of different files. Doing this manually clearly is a horrible task, so I thought scripting would come in handy. 

 

What I would like to do is the following:

  1. Open each file (country shirt)
  2. Run the script which changes the default number 1 to 2
  3. Center the number (number 3 for instance is wider than 1, so it is off-centered)
  4. Save copy of the file with name: $country_name$_$number$
  5. Repeat step 2, 3, 4 until number 99 is reached
  6. Repeat step 1 for all shirts (this can also be done manually, since doing this 24 times is not too bad)

 

I might be terrible at searching, but since I'm fairly new to Illustrator I'm not sure which keywords I should look for. 

 

Does anyone have an idea on where to start, or if there's a topic/video of someone doing something similar?

Wales-01

Thanks in advance!

 

Jeroen 

Adobe Community Professional
Correct answer by CarlosCanto | Adobe Community Professional

Use Variable Data to replace the numbers, and Action (in Batch Mode) to save the different files.

 

check this tutorial to an awesome Illustrator Script and a Demo of the whole process

https://www.youtube.com/watch?v=eCBrK8tZAXQ

TOPICS
Scripting

Views

142

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Mass edit different files

Community Beginner ,
Sep 17, 2020

Copy link to clipboard

Copied

Hi all,

 

I have received .ai files which are illustrations of  football/soccer shirts. (See image for an example) Each shirt has a number on the back side and there are 24 different shirts in total. For each shirt I would like to adjust the numbers on the back, so that I have a copy for numbers 1 up until 99 for each shirt, resulting in 24 * 99 = a lot of different files. Doing this manually clearly is a horrible task, so I thought scripting would come in handy. 

 

What I would like to do is the following:

  1. Open each file (country shirt)
  2. Run the script which changes the default number 1 to 2
  3. Center the number (number 3 for instance is wider than 1, so it is off-centered)
  4. Save copy of the file with name: $country_name$_$number$
  5. Repeat step 2, 3, 4 until number 99 is reached
  6. Repeat step 1 for all shirts (this can also be done manually, since doing this 24 times is not too bad)

 

I might be terrible at searching, but since I'm fairly new to Illustrator I'm not sure which keywords I should look for. 

 

Does anyone have an idea on where to start, or if there's a topic/video of someone doing something similar?

Wales-01

Thanks in advance!

 

Jeroen 

Adobe Community Professional
Correct answer by CarlosCanto | Adobe Community Professional

Use Variable Data to replace the numbers, and Action (in Batch Mode) to save the different files.

 

check this tutorial to an awesome Illustrator Script and a Demo of the whole process

https://www.youtube.com/watch?v=eCBrK8tZAXQ

TOPICS
Scripting

Views

143

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 17, 2020 1
Adobe Community Professional ,
Sep 17, 2020

Copy link to clipboard

Copied

Use Variable Data to replace the numbers, and Action (in Batch Mode) to save the different files.

 

check this tutorial to an awesome Illustrator Script and a Demo of the whole process

https://www.youtube.com/watch?v=eCBrK8tZAXQ

http://bit.ly/1DOEoqJ detailed write-up at link to the left. This video shows how to use the Variable Importer script to set up and use Variable Data in Adob...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 17, 2020 2
Community Beginner ,
Sep 17, 2020

Copy link to clipboard

Copied

Perfect, thank you so much. This indeed seems to be exactly what I need. Will try it out tomorrow! 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 17, 2020 1
Community Beginner ,
Sep 19, 2020

Copy link to clipboard

Copied

This seems to be working so far, so I am happy with that. I do have one problem though that I cannot solve and maybe you can guide a bit. When my variables become double digit, the numbers are no longer aligned in the center of the shirt/artboard. 

 

I tried the following. I selected the number on the back and clicked Align -> Horizontal Align Center, which worked, but only for the currently active shirt.


Do you know how I can solve this? 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 19, 2020 0
Community Beginner ,
Sep 19, 2020

Copy link to clipboard

Copied

Ignore my message above. I cannot delete it unfortunately. I solved it by using a batched action.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 19, 2020 0
Adobe Community Professional ,
Sep 17, 2020

Copy link to clipboard

Copied

There may be different ways, but in order to think about an appropriate approach, one thing is definitely required: At least one sample .ai file, so one can take a look.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 17, 2020 0
Community Beginner ,
Sep 17, 2020

Copy link to clipboard

Copied

Good suggestion indeed. Sorry, I should've added that directly. I cannot seem to edit my original message though and I cannot add .ai files to the reply. Here's the link to the file:

https://drive.google.com/file/d/12g0QaiAMqHD4P9i_t_YitE6z0dCQMr1L/view?usp=sharing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 17, 2020 0