菜鳥救星illustrator教學:如同合併列印的變數功能

文、菜鳥編
Office的合併列印,就算沒真的操作過,應該也都有耳聞。但你知道Adobe illustrator中也有這類似的功能嗎?
在我的身邊,有碰過illustrator但似乎知道這功能的不多。但身為設計人的你,怎麼能放過這好用的功能,不過可別搥心肝,悔恨之前為什麼做員工識別證還要一個個的文字複製貼上!
先看一下完成的效果

從上面的動畫可以知道,透過「變數」的設定來將illustrator中的物件內容變更。這方式根本就跟word中的合併列印一樣嘛!都是透過讀取資料來變更內容。所以首先,也要相將所需的資料製作成一個檔案來給illustrator讀取。在Adobe官方的說明中有提到,所支援的文件類型有CSV與XML。

Step 1、製作識別證樣式
這邊要留意所需要變更內容的物件必須獨立,也就是不能為群組。否則在後面套用資料時就會出現下面的錯誤訊息來。

以這次的範例來說,我們會更換到的內容有,名字、部門、職稱及圖片。

Step 2、資料的準備
前面有提到,資料僅支援CSV與XML,相信你應該跟我一樣馬上就想到Excel,但這邊先提醒你可別使用Excel來製作,至於為什麼,在下面我會另外提出說明。我們先使用google試算表來製作。
文字部分與平常我們輸入資料沒有差別,只有在圖片引用的部分,需要在標題前面加上「@」,而且不能有中文。

資料輸入完畢後,就可下載成CSV格式。

Step 3、將檔案讀入illustrator變數中
在illutrator中,開啟「變數」工具( 視窗 / 變數 )。

按下「讀入」,選定在google試算表所下載的CSV檔案,可以看到欄位標題的顯示。

Step 4、製作動態連結
如果你有操作過Office的合併列印,相信這邊你也很容易就會上手。接下來要操作的就是指定物件是與哪個標題內容作連結,下圖以姓名為例,點擊姓名後,在變數視窗中選定姓名,最後透過下方的「製作文字動態」來綁定。

依樣畫葫蘆,將其他的物件一一綁定,只是圖片顯示的內容會是「製作連結檔案動態」。

Step 5、切換資料組
所有資料都連結好後,上方的資料組就可透過下拉選項看到所設定的資料了。

補充:
還記得有提到別使用Excel嗎?也並不是不能透過Excel來製作,只是需要留意兩點,不然再匯入的時候出現下面的錯誤訊息。

注意1:
還記得圖片的連結需要在標題前面加上「@」嗎?由於Excel中已經將「@」綁定為函數使用,所以在輸入資料時就會報錯,如下面的動畫。

解決方式只要在@的前面加上半形單引號 ( ' )就不會報錯。
注意2:
第二點要留意的就是不可使用中文標題,但內容可以,也就是將姓名、部門與職稱改為英文,且欄位名稱不可有空白,例如job title需改成 job_title

在illustrator中讀入就不會有任何錯誤了。

變數的應用,在設計相同內容但要不斷更換不同資料時,能夠帶來相當大的便利性。以往都要分別的一個個的製作,現在你只需要準備好資料表格就可以。
加入菜鳥救星官方Line並回覆「我想學設計」,不定期獲得更多知識吧!

不同頻道,不同知識!