Skip to main content
Participant
July 7, 2016
Question

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

  • July 7, 2016
  • 1 reply
  • 954 views

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 😎 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!

This topic has been closed for replies.

1 reply

Silly-V
Legend
July 7, 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

Participant
July 7, 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?

Participant
July 7, 2016

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


William, I am looking for someone to write the code for me. I am happy to compensate for this work. Thanks.