I would like to automate a series of actions in Illustrator, creating a complex symbol from vector images imported, or from simple symbols.

The actions are:

  1. Importing files or choosing symbols from a list (like 14.ai ZT.ai L1.ai etc.) - the list can be *.txt, *.csv, eventually *.xml if needed;

  2. Place all the objects horizontal aligned with 1mm spacing (or another amount) between each;

  3. Create a symbol with all these object (name = list).

I wanted first to use a variable, but variables cannot make a re-partition of objects.

I don't know if a script can do such a thing…

1 Answer 1


You may be able to use a special sub-set of scripting usage in conjunction with the variable data. First, if you did not already know this, data-merge processing in Illustrator involves the Batch action process which can iterate through your datasets in your document to populate the art with the appropriate data and then play any action that is set by the user to play on every dataset. Typically the users would have an export action as the most common one - just for outputting the file with the new data presented.

However the ability to play an action carries a special Illustrator-specific bonus: you can play a custom script via the Insert-Menu-Item command when you record the action in the Actions panel. This means, you have the power to play a script whose concern is to simply change the document visual state based on data. The advantage of doing this this way is that when you are creating the script or asking others to create it, the script will be dwelling within a specific range of requirements and thus would make it conducive to quick work. In other words- since you'll need a script which only takes data and customizes your document for a given dataset, you or the person you get to make such a script will not have to worry about batch processing anything yourself but rather processing the one item in a batch.

To create a dataset processing script, it's important to consider your template from the get-go. For such advanced usage it becomes necessary to create a 'script-work' layer where you can keep dummy text frames which become populated with the text variables from the variable data. Some text from your data will indeed be used to present various text in your document, but some of it will have to be used as 'hidden' data which isn't shown visually in the document but is instead used by the dataset-processing script to get instructions.

In your case some of this script-data would be the name of the new symbol you'd like created. This name would be populated into a hidden textbox and the script would read it to use later when the symbol is made.

Other than that, it would take just scripting hard-coded instructions for aligning your items, etc.

I hope this helps!

  • illustrator bath action is for people who work too long :)
    – joojaa
    Commented Aug 30, 2020 at 9:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.