Adobe 26001360 Scripting Guide - Page 58
Working with variables and datasets, Datasets, Launching and quitting Illustrator from a script
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 58 highlights
58 Set frontDocument = appRef.ActiveDocument For Each artItem In frontDocument.PageItems artItem.Transform totalMatrix Next End Sub Scripting Illustrator A matrix object in Illustrator consists of six properties. In AppleScript, these properties are: mvalue_a, mvalue_b, mvalue_c, mvalue_d, mvalue_tx, and mvalue_ty. In Visual Basic, these properties are: MValueA, MValueB, MValueC, MValueD, MValueTX, and MValueTY. By experimenting with the matrix concatenation commands in both AppleScript and Visual Basic, you can discover how to construct matrices that can applied to perform movement (also called translation), rotation, scaling, skewing and other transformations. See the script examples for the matrix commands for working samples. Working with variables and datasets By creating dynamic objects, you can create data-driven graphics. You can define dynamic objects by using variables. In scripting, the variable class corresponds to these variables. Variables are document-level objects; therefore, you create them in the document object. You can add and delete variables to/from a script by using the Add and Remove/ RemoveAll methods (Visual Basic) or make and delete (AppleScript). Datasets Datasets are closely related to variables in that a dataset collects variables and their associated dynamic data into a single object. The DataSet (VB) / dataset (AS) class is the object that corresponds to an AI DataSet. The dataset collection in the document class provides methods so you can create, update and delete datasets. Launching and quitting Illustrator from a script Your scripts can control the activation and quitting of the Illustrator application. Take note of the particular comments below for your scripting system. Launching and quitting from AppleScript Use the activate and quit commands to control Illustrator's run state. The activate command will bring the Illustrator application to the front if it is not already the frontmost application. Note that if the clipboard contains data at the time of quitting, Illustrator may 12 Aug 03