beautypg.com

Generate graphics using data sets, Creating data sets in external files – Adobe Photoshop CS3 User Manual

Page 634

background image

PHOTOSHOP CS3

User Guide

627

Generate graphics using data sets

After you define variables and one or more data sets, you can output, in batch mode, images using the data set values.
You can output images as PSD files.

1

Choose File > Export > Data Sets As Files.

2

Enter a base name for all files generated. You may create your own file-naming scheme if you want.

3

Click the Choose button to select a destination directory for your files.

4

Choose data sets to export.

5

Click OK.

Creating data sets in external files

You can quickly create a large number of data sets by creating an external text file that contains all the variable infor-
mation and loading that file into a PSD document containing variables. One method is to enter your data into a text
file or Microsoft Excel spreadsheet and then export it to a tab or comma-separated file.

The syntax of the external text file is as follows (where each line that starts with “Variable” or “Value” is an entire line
by itself in your file):

All the variable names are listed on the first line, in the order that the values are given in subsequent lines. Each
subsequent line represents one data set, with the values for each variable given.

To create multiple lines of text in a single line of text in a data set, enclose the text in double quotes and insert hard
returns in the tab- or comma-separated file where you want the breaks to occur.

If or is part of the variable value, then the entire value must be enclosed in double quotes.

VariableName1VariableName2 VariableNameN

Value1-1Value2-1>ValueN-1

Value1-2Value2-2ValueN-2

Value1-MValue2-MValueN-M

External text file syntax elements

Either a comma-separated (CSV) or a
tab (tab-delimited) file that separates
each variable name or value.

A newline character that ends each
data set and can be a line feed, carriage
return, or both.

“true” and “false”

Allowed values for a visibility variable.

Spaces

Spaces around the delimiter are
removed when parsing the file;
between words in a value string (e.g.,
two of a kind) spaces are maintained
and leading and trailing spaces are
maintained if enclosed in double
quotes (e.g., “one kind ”).

Double quotes

Can be part of a value if preceded by
another double quote (e.g., ““B”” would
be “B” in the data set).