Copydeck manual

Copydeck links an .ai file to a variables data file (XML, CSV or TXT), shows what changed and updates the texts. The interface is available in English, Italian, French, German and Spanish: use the menu at the top right of the window.

1. Installation

Copy Copydeck.jsx into Illustrator’s Scripts folder:

System Folder
Windows C:\Program Files\Adobe\Adobe Illustrator <version>\Presets\en_US\Scripts\
macOS /Applications/Adobe Illustrator <version>/Presets.localized/en_US/Scripts/

The language folder depends on your Illustrator (en_US, it_IT, fr_FR, de_DE…). Restart Illustrator: the script appears in File > Scripts > Copydeck. Without installing it, use File > Scripts > Other Script… and choose the file.

Keyboard shortcut

A shortcut is recommended, especially for the Pick on artboard workflow.

  1. Window > Actions. Create a new set, then a new action.
  2. As Function Key choose a free key, for example Ctrl+Shift+F12. Do not use F5–F9: Illustrator already uses them (F5 = Brushes) and they win.
  3. Press Record, then in the Actions panel menu choose Insert Menu Item…, click File > Scripts > Copydeck and press OK. Stop recording.
  4. Check that the action contains the Copydeck step: if it is missing, the key does nothing.

If the key stops working after restarting Illustrator, the script step was lost from the action (it happens): repeat step 3.

2. First run on a file

Supported data files

XML – the Variable Library format of Illustrator (Variables panel > Save Variable Library). <p> = paragraph, <br/> = forced line break, <b> and <i> = bold and italic (if the font has those styles).

CSV or tab-delimited TXT – as used by Illustrator and by VariableImporter:

Element Meaning
first row variable names
other rows one record per row
@name image variable (listed, managed by Illustrator)
#name visibility variable (listed, managed by Illustrator)
%name graph variable (listed, managed by Illustrator)
line break inside a cell, or \\ new paragraph

The delimiter (comma, semicolon or tab) and the encoding (UTF-8, UTF-16 “Unicode Text” from Excel, Windows-1252) are detected automatically.

3. Reading the comparison

Tab Variables and comparison. Each row is a variable:

Status Meaning
● To update the text in the document differs from the file
≈ Spaces/line breaks only only spaces or line breaks differ
≈ Case only only upper/lower case differs
○ Not bound the variable exists but no object uses it
+ New in file only in the data file: create it and bind it
! Not in file in the document but not in the data file
✓ Up to date matches the file

How it compares

Using the list

4. Updating

To update Do this
one variable select the row > Update this one
some variables Ctrl/Cmd+click or Shift+click the rows > Update selected rows
all variables Update all variables to update (only the “● To update” ones)
go back Undo last update

How it updates

Important: the changes are already in the document. Save the .ai file.

5. Binding a variable to a text

Automatic: Auto-match…

Available in the Variables and in the Text objects tab. It proposes in a list:

Only the safe rows are preselected. The doubtful ones (same value for several variables, very short values, extra copies) are listed but not selected: the Note column says why. Check, add or remove rows with Ctrl/Cmd+click, then press Bind selected. Double-click a row to see the object.

By hand

The window blocks Illustrator while it is open. There are three ways:

A) Pick on artboard (the handiest): select the variable > Pick on artboard… > the window closes > click the text on the artboard > run the script again with the shortcut. The binding is completed automatically and the window reopens there.

B) Select before opening: select the text in Illustrator > run the script > choose the variable > Bind to selected objects.

C) From the list (tab Text objects): text objects on the left, variables on the right, each list with its own search box.

  1. Search and choose the object (double-click to see it).
  2. Search and choose the variable.
  3. Press Bind object and variable.

The ★ marks likely pairs (object text equal to the variable’s value in the file); rows with ★ go to the top. The object list shows at most 200 rows: if there are more, type in the search box to narrow down.

Other actions

6. How bindings are saved

An object can be bound in two ways, and the script reads both:

If an object has both and they name different variables, Illustrator’s binding wins.

The Note line is written:

Copying artwork

Within the same file: the copy stays bound to the same variable and is updated together with the original. If a copy must no longer follow the variable, select it and press Unbind.

To another file:

  1. In the source file open the script (it saves the missing Notes), close it and save the .ai file.
  2. Copy and paste the artwork into the new file.
  3. In the new file open the script: the objects are already bound. Choose the data file and press Auto-match…: the Restore rows recreate the bindings in the Variables panel too.

Options

In the Text objects tab, bottom right:

7. Good to know

What Where it is saved
link to the data file, update history inside the .ai file (XMP metadata)
object bindings Variables panel and objects’ Notes
options and language Illustrator preferences on this computer