Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Batch conversion of Illustrator files from one colour table to another

New Here ,
Apr 29, 2008 Apr 29, 2008
I'm trying to put together a script to batch convert hundreds of files that were created for a specific printer. Now a different printer will be used each item in each file needs to be given a new corresponding CMYK value so as to print the proper colour on the new printer.

So I need to
read in an array of CMYK conversion table "FromCMYK" and "ToCMYK"
1. load the existing file
2. Cycle through each artwork item (and each stroke and fill for each artwork item)
and in that cycle find it's CMYK values in the FromCMYK table and replace it with its corresponding value in the ToCMYK table
3. Save the file with the same name to a different folder
I've seen some demo scripts from Adobe on how to open and resave docs but I can't find anything that will let me cycly through each artwork item and change the CMYK values

Any help appreciated.
I'm hoping to do the script in JAVA because I'll be writing it on a PC but will only be able to test it and apply it on a MAC where all the files are held.
But really any leg-up will do at this stage

Thanks for any time you give to this - I really appreciate it.
TOPICS
Scripting
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
LEGEND ,
Apr 29, 2008 Apr 29, 2008
Several things come to mind:

> I'm hoping to do the script in JAVA because I'll be writing it on a PC but will only be able to test it and apply it on a MAC

I assume you mean Javascript. Java and Javascript are two entirely different things.

> Cycle through each artwork item (and each stroke and fill for each artwork item)

AI's Javascript implementation does not provide access to multiple fills / strokes on one path.

What version of AI are you using?

Are the colors involved reliably defined as Global?

JET
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 30, 2008 Apr 30, 2008
Brendan,

Are your paths named in the files you want to batch convert? If they are, this should be possible. If not, there will be no way to tell Illustrator which path you want to change the stroke/fill color on.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 01, 2008 May 01, 2008
Thanks
Firstly I meant javascript of course. But actually VB script would do anyway.

I'm using CS3 but the files may come from CS - many of them were saved to be backwardly compatible.

If you mean are they named as variables; No, the paths are not named because these are legacy files made by many different artist with no set protocol. (neither could they be bothered really to assign a variable :-)
I want EVERY path set to new equivalent colours.

I though (perhaps in my innocence) that regardless of variable names, in a normal illustrator cs file each path and stroke must be recorded along with it's colour attributes, weight etc. in which case this is what I need to catch and rewrite with the new attributes.

Or perhaps there is a colour Palette stored somewhere in the file. In this case I just need to go through that and change it to new colours.

Thanks for your help.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 01, 2008 May 01, 2008
I should also mention that actionscript would be just as handy because I intend to make a flash dialogue box which will launch and ask the user which colour pallette they want to change from and to.

Thanks
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 21, 2008 May 21, 2008
LATEST
Hi Brendan,
A bit late maybe, but i am doing the exact same thing as you are asking.
But i do it in our "Alwan colour server" and that works great,
if you dont have a device like that try to do it in Pitstop, that works also!

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