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

Illustrator script to change color of layers, save as *.ai, export to *.svg, etc. (starting with *.dxf format)

Community Beginner ,
Jul 07, 2016 Jul 07, 2016

I need help! I have 10,000 unique image files in *.dxf format (created in AutoCAD). The files
are located in a specific file folder on a server. Each file contains several
layers, including two color layers—one layer named "DOOR FILL" and
one layer named "GLASS". I need an Illustrator script to 1) open a
file, 2) change the color of the DOOR FILL layer to a specific RGB color, 3)
move the GLASS layer to the top, 4) change the color of the GLASS layer to a
specific RGB color, 5) resize the art board to fit the graphic, 6) save the
file with the same file name with *.ai extension), 7) export the file as *.svg
format, then 8) open the next file in the folder and complete the same steps.
This script needs to run in Illustrator 9.0 (because it can open the *.dxf
files without file type errors or distortion of the image). Any assistance would be greatly appreciated!

TOPICS
Scripting
893
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
Valorous Hero ,
Jul 07, 2016 Jul 07, 2016

Whoa, isn't this a good amount of work! However, wasn't Illustrator scripting only available starting with CS2? Or was it only my assumption based on the documentation listed in Illustrator Scripting | Adobe Developer Connection

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
Community Beginner ,
Jul 07, 2016 Jul 07, 2016

You might be right--I read one blog that stated that Illustrator scripting was first introduced with 9.0. But I'll check on this. At this point I've found that CS4 does not recognize the *.dxf format, and CC opens *.dxf but distorts the image. That's why I reverted to my 9.0 copy for opening these *.dxf files.

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
Community Beginner ,
Jul 07, 2016 Jul 07, 2016

Okay, I think I've found a way to convert all of the *.dxf files to *.ai files (in Illustrator 9.0). I found a "scriptographer" plug in for 9.0 that will allow me to script this file conversion process for my 10,000 image files. I won't try to script everything in 9.0, just the conversion from *.dxf to *.ai. So the *.dxf file type problem (requiring Illustrator 9.0) is resolved. Now, I can open the *.ai files in a later version of Illustrator, and hopefully complete the scripting for the color changes, resize of the art board, etc. I own a copy of Illustrator CS4, and also now subscribe to CC. Any direction on the script I need to perform the needed steps?

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
Community Expert ,
Jul 07, 2016 Jul 07, 2016

Do you have any code written yet that you need help with or are you looking for someone to write it for you?

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
Community Beginner ,
Jul 07, 2016 Jul 07, 2016
LATEST

William, I am looking for someone to write the code for me. I am happy to compensate for this work. 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