ADOBE® ILLUSTRATOR® CS5ADOBE ILLUSTRATOR CS5SCRIPTING GUIDE
CHAPTER 1: Introduction Executing scripts 10Viewing the VBScript object modelVBScript provides a type library you can use to view Illustrator obje
CHAPTER 1: Introduction Executing scripts 11Executing scripts from the Other Scripts menu itemThe Other Scripts item at the end of the Scripts men
CHAPTER 1: Introduction Changes in CS5 12For details, see JavaScript Tools Guide.Changes in CS5This section lists changes made to the scripting ob
CHAPTER 1: Introduction Changes in CS5 13ZJavaScript — SymbolRegistrationPoint Z VBScript — AiSymbolRegistrationPoint X A new enumeration for pers
CHAPTER 1: Introduction Changes in CS5 14ruler origin of artboard 1 of document 1 name of artboard 1 of document 1Z JavaScriptactiveDocument.artbo
CHAPTER 1: Introduction Changes in CS5 15ZVBScriptApp.ActiveDocument.ImportPerspectiveGridPreset()App.ActiveDocument.ExportPerspectiveGridPreset()
CHAPTER 1: Introduction Known issues 16version: from FXGVersion.VERSION1PT0 to FXGVersion.VERSION2PT0textPolicy: from textPolicy.KEEPTEXTEDITABLE
CHAPTER 1: Introduction Known issues 17The ESTK debugger uses BridgeTalk to communicate with Illustrator. A single global, persistent, ExtendScrip
182The Illustrator Scripting Object ModelA good understanding of the Illustrator object model will improve your scripting abilities. The followin
CHAPTER 2: The Illustrator Scripting Object Model Object-naming conventions 19Object-naming conventionsThere is one object model for the Illustrat
© 2010 Adobe Systems Incorporated. All rights reserved.Adobe Illustrator CS5 Scripting GuideIf this guide is distributed with software that includes a
CHAPTER 2: The Illustrator Scripting Object Model The artwork tree 20DocumentThe document object, which your scripts can create or access through
CHAPTER 2: The Illustrator Scripting Object Model The artwork tree 21X mesh item X non native itemX path item X placed item X plugin item X raster
CHAPTER 2: The Illustrator Scripting Object Model Text objects 22Color objectsYour script can apply a color, pattern or gradient to a path item ob
CHAPTER 2: The Illustrator Scripting Object Model Text objects 23To create a specific kind of text frame, use the kind property of the text frames
CHAPTER 2: The Illustrator Scripting Object Model Text objects 24Both text frame and story objects have insertion point and text selection propert
CHAPTER 2: The Illustrator Scripting Object Model Dynamic objects 25Dynamic objectsBy creating dynamic objects, you can create data-driven graphic
263Scripting IllustratorThis chapter is an overview of how to use scripting objects to program Illustrator CS5. Specific examples for the support
CHAPTER 3: Scripting Illustrator Working with objects 27XUse the New operator if you added a reference to the Illustrator type library to the proj
CHAPTER 3: Scripting Illustrator Working with objects 28The following objects must be created explicitly:The file and folder objects are Adobe Ext
CHAPTER 3: Scripting Illustrator Working with objects 29VBScriptTo refer to a path items object in a document:Documents(1).PathItems(1)To refer to
3Contents1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CHAPTER 3: Scripting Illustrator Measurement units 30Measurement unitsIllustrator uses points as the unit of measurement for almost all distances.
CHAPTER 3: Scripting Illustrator Page-item positioning and dimensions 31You can see these coordinates in the Info panel when you select or create
CHAPTER 3: Scripting Illustrator Paths and shapes 32Paths and shapesPaths are represented in the Illustrator DOM by the path item object. Path ite
CHAPTER 3: Scripting Illustrator Printing Illustrator documents 33The four values allow you to control interaction based on the source of the scri
344Scripting with AppleScriptThis chapter uses script examples and explanations to help you to become familiar with Illustrator scripting using A
CHAPTER 4: Scripting with AppleScript Object references 35Adding features to “Hello World”Next, we create a new script that makes changes to the I
CHAPTER 4: Scripting with AppleScript Object references 36each consecutive make command. (Choose Event Log at the bottom of the Script Editor wind
CHAPTER 4: Scripting with AppleScript Working with text frames 37Depending on what is selected, the selection property value can be an array of an
CHAPTER 4: Scripting with AppleScript Creating paths and shapes 38Threaded frames make one story objectThreaded frames make a single story object.
CHAPTER 4: Scripting with AppleScript Creating paths and shapes 39-- set stroked to true so we can see the pathset lineRef to make new path item i
Contents 43 Scripting Illustrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
CHAPTER 4: Scripting with AppleScript Working with the perspective grid 40Creating a rectangleConsider the following sample:tell application "
CHAPTER 4: Scripting with AppleScript Working with the perspective grid 41Use perspective presetsIllustrator provides default grid-parameter prese
CHAPTER 4: Scripting with AppleScript Working with the perspective grid 42For a one-point perspective grid, only the left and floor plane are vali
CHAPTER 4: Scripting with AppleScript Working with the perspective grid 43set starRef to make new star with properties {center point:{135, 135}, r
445Scripting with JavaScriptThis chapter uses script examples and explanations to help you to become familiar with Illustrator scripting using Ja
CHAPTER 5: Scripting with JavaScript Working with methods in JavaScript 45Adding features to “Hello World”Next, we create a new script that makes
CHAPTER 5: Scripting with JavaScript Accessing and referencing objects 46Accessing and referencing objects When you write a script, you must first
CHAPTER 5: Scripting with JavaScript Accessing and referencing objects 47The following statements assign the name of the first graphic style in th
CHAPTER 5: Scripting with JavaScript Working with text frames 48Working with selectionsWhen the user makes a selection in a document, the selected
CHAPTER 5: Scripting with JavaScript Creating paths and shapes 49Threaded frames make a single story objectThreaded frames make a single story obj
Contents 5Accessing objects in collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CHAPTER 5: Scripting with JavaScript Creating paths and shapes 50//set stroked to true so we can see the pathmyLine.stroked = true;var newPoint =
CHAPTER 5: Scripting with JavaScript Working with the perspective grid 51Creating a rectangleConsider the following sample var myDocument = app.do
CHAPTER 5: Scripting with JavaScript Working with the perspective grid 52Use perspective presetsIllustrator provides default grid-parameter preset
CHAPTER 5: Scripting with JavaScript Working with the perspective grid 53//Set left plane as the active planeapp.activeDocument.setPerspectiveActi
CHAPTER 5: Scripting with JavaScript Working with the perspective grid 54Bring objects into perspective If an art object is not in perspective, us
556Scripting with VBScriptThis chapter uses script examples and explanations to help you to become familiar with Illustrator scripting using VBSc
CHAPTER 6: Scripting with VBScript Accessing and referencing objects 56Adding features to “Hello World”Next, we create a new script that makes cha
CHAPTER 6: Scripting with VBScript Accessing and referencing objects 57In the script below, the variable pageItemRef will not necessarily refer to
CHAPTER 6: Scripting with VBScript Working with text frames 58Working with text framesTo create a text frame of a specific type in VBScript, use t
CHAPTER 6: Scripting with VBScript Creating paths and shapes 59Using x-y coordinates limits the path to straight segments. To created a curved pat
61IntroductionThis guide describes the scripting interface to Adobe® Illustrator® CS5.If you are new to scripting or want basic information about
CHAPTER 6: Scripting with VBScript Creating paths and shapes 60Combining path-point typesThe following script sample creates a path with three poi
CHAPTER 6: Scripting with VBScript Working with enumeration values 61Creating a polygonConsider the following sample:Set appRef = CreateObject(&qu
CHAPTER 6: Scripting with VBScript Working with the perspective grid 62Working with the perspective gridThe Perspective Grid is a new feature in I
CHAPTER 6: Scripting with VBScript Working with the perspective grid 63Set docRef = appRef.Documents.Add()Rem Show the Perspective Grid defined in
CHAPTER 6: Scripting with VBScript Working with the perspective grid 64call pathItemRect.Resize(200, 200, True, False, False, False, 100, 2)call p
CHAPTER 6: Scripting with VBScript Working with the perspective grid 65Rem Bring the star to the floor planeCall pathItemStar.BringInPerspective(1
66IndexAactions, about, 6Adobe IllustratorPlug-in Software Development Kit Function Reference, 32aki properties, 30anchor points, 32AppleScriptdi
Index 67measurement values, 30methods, using, 45millimeters, conversion, 30Oobject modelchanges in Illustrator CS2, 16diagram, 18text, 22object r
Index 68deleting, 25using, 25VBScriptenumeration values, 61file extension, 7naming conventions, 19type library, 10versions of Illustrator, specif
CHAPTER 1: Introduction Scripting language support in Adobe Illustrator CS5 7Scripting language support in Adobe Illustrator CS5Illustrator script
CHAPTER 1: Introduction Viewing sample scripts 8see the Creative Suite SDK documentation, which is accessible from within the Flash Builder or Ecl
CHAPTER 1: Introduction Viewing the object model 9Viewing the JavaScript object modelTo view the JavaScript object model for Illustrator, follow t
Comments to this Manuals