Adobe 26001360 - Illustrator CS - PC Manual page 4

Scripting guide
Hide thumbs Also See for 26001360 - Illustrator CS - PC:
Table of Contents

Advertisement

iv
Chapter 3: Scripting Illustrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Illustrator's object model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
Looking at Illustrator's objects and commands . . . . . . . . . . . . . . . . . . . . . . . . . . .34
AppleScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34
Visual Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
The application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
Your first Illustrator script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37
Creating an AppleScript script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37
Creating a Visual Basic script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37
VBScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39
Measurement units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42
Unit conversion to points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
Em Space Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
Coordinates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
Fixed points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
Zero point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
Fixed rectangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45
Page item positioning and dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45
Object references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46
Object references in AppleScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46
Object references in Visual Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47
Object containment: document vs. layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48
Working with selections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49
Working with paths. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52
Working with color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52
Working with symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
Working with symbol items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
Working with text art. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
Content of a Text Range. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55
Printing Illustrator Documents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55
Transformation matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56
Using a matrix in an AppleScript script . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57
Using a matrix in a Visual Basic script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57
Working with variables and datasets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58
Datasets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58
Launching and quitting Illustrator from a script . . . . . . . . . . . . . . . . . . . . . . . . . . .58
Launching and quitting from AppleScript . . . . . . . . . . . . . . . . . . . . . . . . . . .58
Launching and quitting from Visual Basic . . . . . . . . . . . . . . . . . . . . . . . . . . .59
Some objects that cannot be created by a script . . . . . . . . . . . . . . . . . . . . . . . . . .59

Advertisement

Table of Contents
loading

This manual is also suitable for:

Illustrator cs

Table of Contents