Adobe 65010248 Scripting Guide - Page 24
Dynamic objects, Symbols, Transformations
UPC - 883919156484
View all Adobe 65010248 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 24 highlights
CHAPTER 2: The Illustrator Scripting Object Model Dynamic objects 24 Dynamic objects By creating dynamic objects, you can create data-driven graphics. In the Illustrator application, you use the Variables panel to create or edit variables like graph data, linked file, text string, and visibility, or variables whose type is not specified. In scripting, you use the variable object to represent this type of variable. The variable object's kind property indicates the type of dynamic data that a variable object holds. variable objects are document-level objects; you create them in a document object. NOTE: Do not confuse variable objects with scripting variables. For details on Illustrator variables, dynamic objects, and data-driven graphics, see Illustrator Help. Datasets, which collect variables and their associated dynamic data into one object, are represented in scripting by the dataset object. The dataset object provides methods to update and delete dataset objects in your scripts. Symbols In Illustrator, symbols are art items that are stored in the Symbols panel. Your scripts can create, delete, and duplicate symbol objects. When you create symbol objects in your script, Illustrator adds them to the Symbols panel for the target document. A symbol item is an instance of a symbol object in a document. Each symbol item is linked to its symbol definition, so changing the definition of a symbol updates all instances of the symbol. Your script can create, delete, and duplicate symbol items. Symbol items are Illustrator art items; therefore, they can be treated in the same way as other art items or page items. You can rotate, resize, select, lock, hide, and perform other operations on symbol items. Transformations The matrix object provides access to the power of geometric-transformation matrices. Transformation matrices in Illustrator store the settings of an operation that scales, rotates, or moves (translates) an object on a page. There are advantages to using matrices: ➤ By storing transformation values in a matrix object, you can use the values repeatedly on different objects in your script. ➤ By concatenating rotation, translation, and/or scaling matrices and applying the resulting matrix, you can perform many geometric transformations with only one script statement. ➤ You can invert matrix values. ➤ You can compare the values of two matrices. The application object. has commands or methods to create, get, invert, compare, or concatenate matrices. The command or method used to apply a matrix is the transform command, which belongs to any type of object on which transformations can be performed.