Macromedia CS2 Reference Manual

2
cs
®
Illustrator
®
Visual Basic Scripting Reference
Adobe
bbc
© 2005 Adobe Systems Incorporated. All rights reserved.
Æ
Illustrator® CS2 Visual Basic Scripting Reference for Windows®.
NOTICE: All information contained herein is the property of Adobe Systems Incorporated. No part of this publication (whether in hardcopy or electronic form) may be reproduced or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written consent of Adobe Systems Incorporated. The software described in this document is furnished under license and may only be used or copied in accordance with the terms of such license.
This publication and the information herein is furnished AS IS, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies, makes no warranty of any kind (express, implied, or statutory) with respect to this publication, and expressly disclaims any and all warranties of merchantability, fitness for particular purposes, and noninfringement of third party rights.
Any references to company names in sample templates are for demonstration purposes only and are not intended to refer to any actual organization.
Adobe, the Adobe logo, Acrobat, and Illustrator are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries.
Apple, Mac, Macintosh, and Mac OS are trademarks of Apple Computer, Inc., registered in the United States and other countries. Microsoft, Windows, and Visual Basic are either registered trademarks or trademarks of Microsoft Corporation in the United States and other countries. JavaScript and all Java-related marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. UNIX is a registered trademark of The Open Group.
All other trademarks are the property of their respective owners.
If this guide is distributed with software that includes an end user agreement, this guide, as well as the software described in it, is furnished under license and may be used or copied only in accordance with the terms of such license. Except as permitted by any such license, no part of this guide may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of Adobe Systems Incorporated. Please note that the content in this guide is protected under copyright law even if it is not distributed with software that includes an end user license agreement.
The content of this guide is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may appear in the informational content contained in this guide.
Adobe Systems Incorporated, 345 Park Avenue, San Jose, California 95110, USA.

Contents

1 Introduction ...............................................................................................................................44
About this Manual........................................................................................................................................................................44
What is Scripting?.........................................................................................................................................................................44
Why use scripting?.................................................................................................................................................................44
What about actions? .............................................................................................................................................................45
Script Support in Adobe Illustrator CS2 ...............................................................................................................................45
Executing scripts ....................................................................................................................................................................46
Installing scripts ...............................................................................................................................................................46
Executing other scripts..................................................................................................................................................46
System requirements for Windows and Visual Basic ................................................................................................46
Changes to Visual Basic and VBA support in Adobe Illustrator CS2....................................................................47
2 Scripting Basics.......................................................................................................................... 48
Object Model Concepts .............................................................................................................................................................48
Object classes ..........................................................................................................................................................................49
Object inheritance .................................................................................................................................................................49
Object elements or collections .........................................................................................................................................49
Object references...................................................................................................................................................................49
Scripting Concepts.......................................................................................................................................................................50
Comments ................................................................................................................................................................................50
Long script lines......................................................................................................................................................................50
Value types ...............................................................................................................................................................................50
Variables ....................................................................................................................................................................................51
Declaring variables..........................................................................................................................................................51
Assigning variable values .............................................................................................................................................51
Variable naming ...............................................................................................................................................................51
Script properties...............................................................................................................................................................52
Operators ..................................................................................................................................................................................52
Methods ....................................................................................................................................................................................52
Conditional statements .......................................................................................................................................................52
Control structures ..................................................................................................................................................................53
Subroutines..............................................................................................................................................................................53
Testing and Troubleshooting ..................................................................................................................................................54
About error handling............................................................................................................................................................54
Visual Basic Resources ................................................................................................................................................................55
3 Scripting Illustrator ................................................................................................................... 56
The Illustrator Object Model ....................................................................................................................................................56
Looking at Illustrator objects and commands.............................................................................................................57
Your First Illustrator Script.........................................................................................................................................................57
VBScript .....................................................................................................................................................................................58
Adding features to “Hello World”.....................................................................................................................................59
Object References ........................................................................................................................................................................60
Creating objects in Visual Basic ........................................................................................................................................60
Objects that must be created ............................................................................................................................................61
Objects that cannot be created by a script...................................................................................................................61
3
Adobe Illustrator CS2
Visual Basic Scripting Reference 4
Object containment: document vs. layer ......................................................................................................................62
Syntax Differences Between Sub and Function Methods .............................................................................................62
Working with Document Contents........................................................................................................................................63
Working with selections ......................................................................................................................................................63
Working with paths ...............................................................................................................................................................64
Working with color ................................................................................................................................................................64
Working with symbols and symbol items.....................................................................................................................65
Working with text art............................................................................................................................................................65
Content of a text range..................................................................................................................................................66
Character style, character attributes, local character attributes.....................................................................66
Measurement Units .....................................................................................................................................................................66
Unit conversion to points....................................................................................................................................................67
Em Space Units .......................................................................................................................................................................67
Coordinates..............................................................................................................................................................................67
Fixed points..............................................................................................................................................................................68
Zero point .................................................................................................................................................................................68
Fixed rectangle .......................................................................................................................................................................68
Page item positioning and dimensions .........................................................................................................................68
Printing Illustrator Documents................................................................................................................................................69
Transformation Matrices............................................................................................................................................................70
Working with Variables and Datasets ...................................................................................................................................71
Launching and Quitting Illustrator from a Script..............................................................................................................71
User Interaction Levels ...............................................................................................................................................................72
4 Visual Basic Object Reference................................................................................................... 73
Application .....................................................................................................................................................................................74
Application properties .........................................................................................................................................................74
ActionIsRunning.....................................................................................................................................................................74
ActiveDocument ....................................................................................................................................................................74
Application ...............................................................................................................................................................................74
BrowserAvailable....................................................................................................................................................................74
Documents ...............................................................................................................................................................................74
FlattenerPresetsList...............................................................................................................................................................74
FreeMemory.............................................................................................................................................................................74
Name ..........................................................................................................................................................................................74
Path .............................................................................................................................................................................................74
PDFPresetsList.........................................................................................................................................................................74
PPDFileList ................................................................................................................................................................................74
Preferences...............................................................................................................................................................................74
PrinterList..................................................................................................................................................................................74
PrintPresetsList .......................................................................................................................................................................74
ScriptingVersion .....................................................................................................................................................................74
Selection....................................................................................................................................................................................74
TextFonts ..................................................................................................................................................................................75
TracingPresetList....................................................................................................................................................................75
UserInteractionLevel.............................................................................................................................................................75
Version .......................................................................................................................................................................................75
Visible .........................................................................................................................................................................................75
Application methods ............................................................................................................................................................75
ConcatenateMatrix................................................................................................................................................................75
ConcatenateRotationMatrix...............................................................................................................................................75
Adobe Illustrator CS2
Visual Basic Scripting Reference 5
ConcatenateScaleMatrix .....................................................................................................................................................75
ConcatenateTranslationMatrix .........................................................................................................................................75
DoJavaScript ............................................................................................................................................................................75
DoJavaScriptFile .....................................................................................................................................................................75
DoScript.....................................................................................................................................................................................75
GetIdentityMatrix...................................................................................................................................................................75
GetRotationMatrix .................................................................................................................................................................75
GetScaleMatrix........................................................................................................................................................................76
GetTranslationMatrix ............................................................................................................................................................76
InvertMatrix..............................................................................................................................................................................76
IsEqualMatrix ...........................................................................................................................................................................76
IsSingularMatrix......................................................................................................................................................................76
Open ...........................................................................................................................................................................................76
Quit..............................................................................................................................................................................................76
Redraw .......................................................................................................................................................................................76
ShowPresets.............................................................................................................................................................................76
TranslatePlaceholderText ...................................................................................................................................................76
Brush .................................................................................................................................................................................................79
Brush properties .....................................................................................................................................................................79
Application ...............................................................................................................................................................................79
Name ..........................................................................................................................................................................................79
Parent .........................................................................................................................................................................................79
Brush methods........................................................................................................................................................................79
ApplyTo .....................................................................................................................................................................................79
Brushes.............................................................................................................................................................................................80
Brushes properties.................................................................................................................................................................80
Application ...............................................................................................................................................................................80
Count..........................................................................................................................................................................................80
Parent .........................................................................................................................................................................................80
Brushes methods....................................................................................................................................................................80
Index ...........................................................................................................................................................................................80
Item .............................................................................................................................................................................................80
CharacterAttributes.....................................................................................................................................................................81
CharacterAttributes properties.........................................................................................................................................81
AkiLeft ........................................................................................................................................................................................81
AkiRight .....................................................................................................................................................................................81
Alignment.................................................................................................................................................................................81
AlternateGlyphs......................................................................................................................................................................81
Application ...............................................................................................................................................................................81
AutoLeading ............................................................................................................................................................................81
BaselineDirection ...................................................................................................................................................................81
BaselinePosition .....................................................................................................................................................................81
BaselineShift ............................................................................................................................................................................81
Capitalization...........................................................................................................................................................................81
ConnectionForms ..................................................................................................................................................................81
ContextualLigature................................................................................................................................................................81
DiscretionaryLigature ...........................................................................................................................................................81
FigureStyle................................................................................................................................................................................81
FillColor......................................................................................................................................................................................81
Fractions....................................................................................................................................................................................82
HorizontalScale................................................................................................................
.......................................................82
Adobe Illustrator CS2
Visual Basic Scripting Reference 6
Italics...........................................................................................................................................................................................82
KerningMethod.......................................................................................................................................................................82
Language ..................................................................................................................................................................................82
Leading ......................................................................................................................................................................................82
Ligature......................................................................................................................................................................................82
NoBreak .....................................................................................................................................................................................82
OpenTypePosition.................................................................................................................................................................82
Ordinals......................................................................................................................................................................................82
Ornaments................................................................................................................................................................................82
OverprintFill .............................................................................................................................................................................82
OverprintStroke ......................................................................................................................................................................82
Parent .........................................................................................................................................................................................82
ProportionalMetrics ..............................................................................................................................................................82
Rotation .....................................................................................................................................................................................82
Size ..............................................................................................................................................................................................82
StrikeThrough..........................................................................................................................................................................82
StrokeColor...............................................................................................................................................................................82
StrokeWeight...........................................................................................................................................................................82
StylisticAlternates ..................................................................................................................................................................82
Swash .........................................................................................................................................................................................82
TateChuYokoHorizontal ......................................................................................................................................................82
TateChuYokoVertical ............................................................................................................................................................83
TextFont ....................................................................................................................................................................................83
Titling..........................................................................................................................................................................................83
Tracking .....................................................................................................................................................................................83
Tsume.........................................................................................................................................................................................83
Underline ..................................................................................................................................................................................83
VerticalScale.............................................................................................................................................................................83
WariChuCharactersAfter Break .........................................................................................................................................83
WariChuCharactersBeforeBreak .......................................................................................................................................83
WariChuEnabled.....................................................................................................................................................................83
WariChuJustification.............................................................................................................................................................83
WariChuLineGap ....................................................................................................................................................................83
WariChuLines...........................................................................................................................................................................83
WariChuScale...........................................................................................................................................................................83
Characters .......................................................................................................................................................................................85
Characters properties ...........................................................................................................................................................85
Application ...............................................................................................................................................................................85
Count..........................................................................................................................................................................................85
Parent .........................................................................................................................................................................................85
Characters methods..............................................................................................................................................................85
Add..............................................................................................................................................................................................85
AddBefore.................................................................................................................................................................................85
Index ...........................................................................................................................................................................................85
RemoveAll.................................................................................................................................................................................85
CharacterStyle ...............................................................................................................................................................................86
CharacterStyle properties ...................................................................................................................................................86
Application ...............................................................................................................................................................................86
CharacterAttributes...............................................................................................................................................................86
Name ..........................................................................................................................................................................................86
Parent .........................................................................................................................
................................................................86
Adobe Illustrator CS2
Visual Basic Scripting Reference 7
CharacterStyle methods ......................................................................................................................................................86
ApplyTo .....................................................................................................................................................................................86
Delete .........................................................................................................................................................................................86
CharacterStyles .............................................................................................................................................................................87
CharacterStyles properties .................................................................................................................................................87
Application ...............................................................................................................................................................................87
Count..........................................................................................................................................................................................87
Parent .........................................................................................................................................................................................87
CharacterStyles methods ....................................................................................................................................................87
Add..............................................................................................................................................................................................87
Index ...........................................................................................................................................................................................87
Item .............................................................................................................................................................................................87
RemoveAll.................................................................................................................................................................................87
CMYKColor......................................................................................................................................................................................89
CMYKColor properties..........................................................................................................................................................89
Application ...............................................................................................................................................................................89
Black............................................................................................................................................................................................89
Cyan ............................................................................................................................................................................................89
Magenta ....................................................................................................................................................................................89
Yellow.........................................................................................................................................................................................89
CompoundPathItem ...................................................................................................................................................................90
CompoundPathItem properties .......................................................................................................................................90
Application ...............................................................................................................................................................................90
ArtworkKnockout...................................................................................................................................................................90
BlendingMode.........................................................................................................................................................................90
ControlBounds........................................................................................................................................................................90
Editable......................................................................................................................................................................................90
GeometricBounds..................................................................................................................................................................90
Height.........................................................................................................................................................................................90
Hidden........................................................................................................................................................................................90
IsIsolated ...................................................................................................................................................................................90
Layer ...........................................................................................................................................................................................90
Left...............................................................................................................................................................................................90
Locked........................................................................................................................................................................................90
Name ..........................................................................................................................................................................................90
Opacity.......................................................................................................................................................................................90
Parent .........................................................................................................................................................................................90
PathItems ..................................................................................................................................................................................90
Position ......................................................................................................................................................................................91
Selected .....................................................................................................................................................................................91
Sliced ..........................................................................................................................................................................................91
Tags.............................................................................................................................................................................................91
Top...............................................................................................................................................................................................91
URL ..............................................................................................................................................................................................91
VisibilityVariable .....................................................................................................................................................................91
VisibleBounds..........................................................................................................................................................................91
Width ..........................................................................................................................................................................................91
WrapInside................................................................................................................................................................................91
WrapOffset................................................................................................................................................................................91
Wrapped....................................................................................................................................................................................91
ZOrderPosition.................................................................................................................
.......................................................91
Adobe Illustrator CS2
Visual Basic Scripting Reference 8
CompoundPathItem methods ..........................................................................................................................................91
Copy............................................................................................................................................................................................91
Cut ...............................................................................................................................................................................................91
Delete .........................................................................................................................................................................................91
Duplicate...................................................................................................................................................................................91
Move ...........................................................................................................................................................................................91
Resize..........................................................................................................................................................................................92
Rotate .........................................................................................................................................................................................92
Transform..................................................................................................................................................................................92
Translate....................................................................................................................................................................................92
ZOrder........................................................................................................................................................................................92
CompoundPathItems .................................................................................................................................................................94
CompoundPathItems properties .....................................................................................................................................94
Application ...............................................................................................................................................................................94
Count..........................................................................................................................................................................................94
Parent .........................................................................................................................................................................................94
CompoundPathItem methods ..........................................................................................................................................94
Add..............................................................................................................................................................................................94
Index ...........................................................................................................................................................................................94
Item .............................................................................................................................................................................................94
RemoveAll.................................................................................................................................................................................94
DataSet.............................................................................................................................................................................................95
DataSet properties.................................................................................................................................................................95
Application ...............................................................................................................................................................................95
Name ..........................................................................................................................................................................................95
Parent .........................................................................................................................................................................................95
DataSet methods ...................................................................................................................................................................95
Delete .........................................................................................................................................................................................95
Display........................................................................................................................................................................................95
Update .......................................................................................................................................................................................95
DataSets...........................................................................................................................................................................................96
DataSets properties...............................................................................................................................................................96
Application ...............................................................................................................................................................................96
Count..........................................................................................................................................................................................96
Parent .........................................................................................................................................................................................96
DataSets methods..................................................................................................................................................................96
Add..............................................................................................................................................................................................96
Index ...........................................................................................................................................................................................96
Item .............................................................................................................................................................................................96
RemoveAll.................................................................................................................................................................................96
Document .......................................................................................................................................................................................98
Document properties ...........................................................................................................................................................98
ActiveDataSet..........................................................................................................................................................................98
ActiveLayer...............................................................................................................................................................................98
ActiveView................................................................................................................................................................................98
Application ...............................................................................................................................................................................98
Brushes.......................................................................................................................................................................................98
CharacterStyles .......................................................................................................................................................................98
CompoundPathItems ...........................................................................................................................................................98
CropBox .....................................................................................................................................................................................98
CropStyle......................................................................................................................
.............................................................98
Adobe Illustrator CS2
Visual Basic Scripting Reference 9
DataSets.....................................................................................................................................................................................98
DefaultFillColor.......................................................................................................................................................................98
DefaultFilled.............................................................................................................................................................................98
DefaultFillOverprint ..............................................................................................................................................................98
DefaultStrokeCap...................................................................................................................................................................98
DefaultStrokeColor................................................................................................................................................................99
DefaultStroked........................................................................................................................................................................99
DefaultStrokeDashes ............................................................................................................................................................99
DefaultStrokeDashOffset ....................................................................................................................................................99
DefaultStrokeJoin ..................................................................................................................................................................99
DefaultStrokeMiterLimit......................................................................................................................................................99
DefaultStrokeOverprint .......................................................................................................................................................99
DefaultStrokeWidth ..............................................................................................................................................................99
DocumentColorSpace ..........................................................................................................................................................99
FullName ...................................................................................................................................................................................99
GeometricBounds..................................................................................................................................................................99
Gradients...................................................................................................................................................................................99
GraphicStyles...........................................................................................................................................................................99
GraphItems...............................................................................................................................................................................99
GroupItems ..............................................................................................................................................................................99
Height.........................................................................................................................................................................................99
InkList ...................................................................................................................................................................................... 100
KinsokuSet............................................................................................................................................................................. 100
Layers....................................................................................................................................................................................... 100
LegacyTextItems ................................................................................................................................................................. 100
MeshItems ............................................................................................................................................................................. 100
MojikumiSet .......................................................................................................................................................................... 100
Name ....................................................................................................................................................................................... 100
OutputResolution ............................................................................................................................................................... 100
PageItems .............................................................................................................................................................................. 100
PageOrigin............................................................................................................................................................................. 100
ParagraphStyles................................................................................................................................................................... 100
Parent ...................................................................................................................................................................................... 100
Path .......................................................................................................................................................................................... 100
PathItems ............................................................................................................................................................................... 100
Patterns................................................................................................................................................................................... 100
PlacedItems........................................................................................................................................................................... 100
PluginItems ........................................................................................................................................................................... 100
PrintTiles................................................................................................................................................................................. 100
RasterItems............................................................................................................................................................................ 100
RulerOrigin ............................................................................................................................................................................ 101
RulerUnits .............................................................................................................................................................................. 101
Saved ....................................................................................................................................................................................... 101
Selection................................................................................................................................................................................. 101
ShowPlacedImages ............................................................................................................................................................ 101
SplitLongPaths..................................................................................................................................................................... 101
Spots........................................................................................................................................................................................ 101
Stationary............................................................................................................................................................................... 101
Stories...................................................................................................................................................................................... 101
Swatches ................................................................................................................................................................................ 101
SymbolItems ....................................................................................................................
..................................................... 101
Adobe Illustrator CS2
Visual Basic Scripting Reference 10
Symbols .................................................................................................................................................................................. 101
Tags.......................................................................................................................................................................................... 101
TextFrames ............................................................................................................................................................................ 101
TileFullPages......................................................................................................................................................................... 101
UseDefaultScreen ............................................................................................................................................................... 101
Variables ................................................................................................................................................................................. 101
VariablesLocked................................................................................................................................................................... 101
Views........................................................................................................................................................................................ 101
VisibleBounds....................................................................................................................................................................... 102
Width ....................................................................................................................................................................................... 102
Document methods........................................................................................................................................................... 102
Activate................................................................................................................................................................................... 102
Close ........................................................................................................................................................................................ 102
Copy......................................................................................................................................................................................... 102
Cut ............................................................................................................................................................................................ 102
ExportPDFPreset.................................................................................................................................................................. 102
Export ...................................................................................................................................................................................... 102
ExportPDFPreset.................................................................................................................................................................. 102
ExportPrintPreset ................................................................................................................................................................ 102
ExportVariables.................................................................................................................................................................... 102
ImportCharacterStyles ...................................................................................................................................................... 102
ImportParagraphStyles ..................................................................................................................................................... 102
ImportPDFPreset................................................................................................................................................................. 103
ImportPrintPreset................................................................................................................................................................ 103
ImportVariables(.................................................................................................................................................................. 103
Paste......................................................................................................................................................................................... 103
PrintOut .................................................................................................................................................................................. 103
Save.......................................................................................................................................................................................... 103
SaveAs..................................................................................................................................................................................... 103
Documents .................................................................................................................................................................................. 104
Documents properties ...................................................................................................................................................... 104
Application ............................................................................................................................................................................ 104
Count....................................................................................................................................................................................... 104
Parent ...................................................................................................................................................................................... 104
Documents methods......................................................................................................................................................... 104
Add........................................................................................................................................................................................... 104
Index ........................................................................................................................................................................................ 104
Item .......................................................................................................................................................................................... 104
EPSSaveOptions......................................................................................................................................................................... 105
EPSSaveOptions properties............................................................................................................................................. 105
Application ............................................................................................................................................................................ 105
CMYKPostScript ................................................................................................................................................................... 105
Compatibility ........................................................................................................................................................................ 105
CompatibleGradientPrinting .......................................................................................................................................... 105
EmbedAllFonts..................................................................................................................................................................... 105
EmbedLinkedFiles............................................................................................................................................................... 105
FlattenOuput ........................................................................................................................................................................ 105
IncludeDocumentThumbnails ....................................................................................................................................... 105
Overprint................................................................................................................................................................................ 105
PostScript............................................................................................................................................................................... 105
Preview ........................................................................................................................
........................................................... 105
Adobe Illustrator CS2
Visual Basic Scripting Reference 11
ExportOptionsFlash .................................................................................................................................................................. 107
ExportOptionsFlash properties...................................................................................................................................... 107
Application ............................................................................................................................................................................ 107
ArtBoardClipping ................................................................................................................................................................ 107
BackgroundColor ................................................................................................................................................................ 107
BackgroundLayers .............................................................................................................................................................. 107
BlendAnimation................................................................................................................................................................... 107
Compressed .......................................................................................................................................................................... 107
ConvertTextToOutlines..................................................................................................................................................... 107
CurveQuality ......................................................................................................................................................................... 107
ExportStyle ............................................................................................................................................................................ 107
FlattenOutput....................................................................................................................................................................... 107
FrameRate.............................................................................................................................................................................. 107
GenerateHTML ..................................................................................................................................................................... 107
ImageFormat ........................................................................................................................................................................ 107
JPEGMethod.......................................................................................................................................................................... 107
JPEGQuality ........................................................................................................................................................................... 107
LayerOrder............................................................................................................................................................................. 108
Looping .................................................................................................................................................................................. 108
ReadOnly................................................................................................................................................................................ 108
Replacing ............................................................................................................................................................................... 108
Resolution.............................................................................................................................................................................. 108
ExportOptionsGIF...................................................................................................................................................................... 109
ExportOptionsGIF properties.......................................................................................................................................... 109
AntiAliasing ........................................................................................................................................................................... 109
Application ............................................................................................................................................................................ 109
ArtBoardClipping ................................................................................................................................................................ 109
ColorCount ............................................................................................................................................................................ 109
ColorDither............................................................................................................................................................................ 109
ColorReduction.................................................................................................................................................................... 109
DitherPercent ....................................................................................................................................................................... 109
HorizontalScale.................................................................................................................................................................... 109
InfoLossPercent ................................................................................................................................................................... 109
Interlaced ............................................................................................................................................................................... 109
Matte........................................................................................................................................................................................ 109
MatteColor............................................................................................................................................................................. 109
SaveAsHTML ......................................................................................................................................................................... 109
Transparency ........................................................................................................................................................................ 109
VerticalScale.......................................................................................................................................................................... 110
WebSnap................................................................................................................................................................................ 110
ExportOptionsJPEG................................................................................................................................................................... 111
ExportOptionsJPEG ............................................................................................................................................................ 111
AntiAliasing ........................................................................................................................................................................... 111
Application ............................................................................................................................................................................ 111
ArtBoardClipping ................................................................................................................................................................ 111
BlurAmount........................................................................................................................................................................... 111
HorizontalScale.................................................................................................................................................................... 111
Matte........................................................................................................................................................................................ 111
MatteColor............................................................................................................................................................................. 111
Optimization......................................................................................................................................................................... 111
QualitySetting .................................................................................................................
..................................................... 111
Adobe Illustrator CS2
Visual Basic Scripting Reference 12
SaveAsHTML ......................................................................................................................................................................... 111
VerticalScale.......................................................................................................................................................................... 111
ExportOptionsPhotoshop ...................................................................................................................................................... 112
ExportOptionsPhotoshop properties .......................................................................................................................... 112
AntiAliasing ........................................................................................................................................................................... 112
Application ............................................................................................................................................................................ 112
Compatibility ........................................................................................................................................................................ 112
EditableText .......................................................................................................................................................................... 112
EmbedICCProfile ................................................................................................................................................................. 112
ImageColorSpace................................................................................................................................................................ 112
MaximumEditability........................................................................................................................................................... 112
Resolution.............................................................................................................................................................................. 112
Warnings ................................................................................................................................................................................ 112
WriteLayers............................................................................................................................................................................ 112
ExportOptionsPNG8 ................................................................................................................................................................. 113
ExportOptionsPNG8 properties..................................................................................................................................... 113
AntiAliasing ........................................................................................................................................................................... 113
Application ............................................................................................................................................................................ 113
ArtBoardClipping ................................................................................................................................................................ 113
ColorCount ............................................................................................................................................................................ 113
ColorDither............................................................................................................................................................................ 113
ColorReduction.................................................................................................................................................................... 113
DitherPercent ....................................................................................................................................................................... 113
HorizontalScale.................................................................................................................................................................... 113
Interlaced ............................................................................................................................................................................... 113
Matte........................................................................................................................................................................................ 113
MatteColor............................................................................................................................................................................. 113
SaveAsHTML ......................................................................................................................................................................... 113
Transparency ........................................................................................................................................................................ 113
VerticalScale.......................................................................................................................................................................... 113
WebSnap................................................................................................................................................................................ 113
ExportOptionsPNG24............................................................................................................................................................... 115
ExportOptionsPNG24 properties .................................................................................................................................. 115
AntiAliasing ........................................................................................................................................................................... 115
Application ............................................................................................................................................................................ 115
ArtBoardClipping ................................................................................................................................................................ 115
HorizontalScale.................................................................................................................................................................... 115
Matte........................................................................................................................................................................................ 115
MatteColor............................................................................................................................................................................. 115
SaveAsHTML ......................................................................................................................................................................... 115
Transparency ........................................................................................................................................................................ 115
VerticalScale.......................................................................................................................................................................... 115
ExportOptionsSVG .................................................................................................................................................................... 116
ExportOptionsSVG properties ........................................................................................................................................ 116
Application ............................................................................................................................................................................ 116
Compressed .......................................................................................................................................................................... 116
CoordinatePrecision........................................................................................................................................................... 116
CSSProperties ....................................................................................................................................................................... 116
DocumentEncoding........................................................................................................................................................... 116
DTD........................................................................................................................................................................................... 116
EmbedRasterImages ..............................................................................................................
............................................ 116
Adobe Illustrator CS2
Visual Basic Scripting Reference 13
FontSubsetting .................................................................................................................................................................... 116
FontType ................................................................................................................................................................................ 116
IncludeFileInfo ..................................................................................................................................................................... 116
IncludeVariablesAndDatasets ........................................................................................................................................ 116
OptimizeForSVGViewer .................................................................................................................................................... 116
PreserveEditability.............................................................................................................................................................. 116
Slices ........................................................................................................................................................................................ 117
SVGAutoKerning ................................................................................................................................................................. 117
SVGTextOnPath ................................................................................................................................................................... 117
Gradient ........................................................................................................................................................................................ 118
Gradient properties............................................................................................................................................................ 118
Application ............................................................................................................................................................................ 118
GradientStops ...................................................................................................................................................................... 118
Name ....................................................................................................................................................................................... 118
Parent ...................................................................................................................................................................................... 118
Type ......................................................................................................................................................................................... 118
Gradient methods............................................................................................................................................................... 118
Delete ...................................................................................................................................................................................... 118
GradientColor ............................................................................................................................................................................. 120
GradientColor properties ................................................................................................................................................. 120
Angle ....................................................................................................................................................................................... 120
Application ............................................................................................................................................................................ 120
Gradient.................................................................................................................................................................................. 120
HiliteAngle............................................................................................................................................................................. 120
HiliteLength .......................................................................................................................................................................... 120
Length..................................................................................................................................................................................... 120
Matrix....................................................................................................................................................................................... 120
Origin....................................................................................................................................................................................... 120
Gradients ...................................................................................................................................................................................... 121
Gradients properties .......................................................................................................................................................... 121
Application ............................................................................................................................................................................ 121
Count....................................................................................................................................................................................... 121
Parent ...................................................................................................................................................................................... 121
Gradients methods............................................................................................................................................................. 121
Add........................................................................................................................................................................................... 121
Index ........................................................................................................................................................................................ 121
Item .......................................................................................................................................................................................... 121
RemoveAll.............................................................................................................................................................................. 121
GradientStop............................................................................................................................................................................... 122
GradientStop properties................................................................................................................................................... 122
Application ............................................................................................................................................................................ 122
Color......................................................................................................................................................................................... 122
Midpoint................................................................................................................................................................................. 122
Parent ...................................................................................................................................................................................... 122
RampPoint ............................................................................................................................................................................. 122
GradientStop methods ..................................................................................................................................................... 122
Delete ...................................................................................................................................................................................... 122
GradientStops............................................................................................................................................................................. 123
GradientStops properties................................................................................................................................................. 123
Application ............................................................................................................................................................................ 123
Count..........................................................................................................................
............................................................. 123
Adobe Illustrator CS2
Visual Basic Scripting Reference 14
Parent ...................................................................................................................................................................................... 123
GradientStops methods ................................................................................................................................................... 123
Add........................................................................................................................................................................................... 123
Index ........................................................................................................................................................................................ 123
Item .......................................................................................................................................................................................... 123
RemoveAll.............................................................................................................................................................................. 123
GraphicStyle ................................................................................................................................................................................ 125
GraphicStyle properties.................................................................................................................................................... 125
Application ............................................................................................................................................................................ 125
Name ....................................................................................................................................................................................... 125
Parent ...................................................................................................................................................................................... 125
GraphicStyle methods....................................................................................................................................................... 125
ApplyTo .................................................................................................................................................................................. 125
Delete ...................................................................................................................................................................................... 125
GraphicStyles .............................................................................................................................................................................. 126
GraphicStyles properties .................................................................................................................................................. 126
Application ............................................................................................................................................................................ 126
Count....................................................................................................................................................................................... 126
Parent ...................................................................................................................................................................................... 126
GraphicStyles methods..................................................................................................................................................... 126
Index ........................................................................................................................................................................................ 126
Item .......................................................................................................................................................................................... 126
RemoveAll.............................................................................................................................................................................. 126
GraphItem.................................................................................................................................................................................... 127
GraphItem properties........................................................................................................................................................ 127
Application ............................................................................................................................................................................ 127
ArtworkKnockout................................................................................................................................................................ 127
BlendingMode...................................................................................................................................................................... 127
ContentVariable................................................................................................................................................................... 127
ControlBounds..................................................................................................................................................................... 127
Editable................................................................................................................................................................................... 127
GeometricBounds............................................................................................................................................................... 127
Height...................................................................................................................................................................................... 127
Hidden..................................................................................................................................................................................... 127
IsIsolated ................................................................................................................................................................................ 127
Layer ........................................................................................................................................................................................ 127
Left............................................................................................................................................................................................ 127
Locked..................................................................................................................................................................................... 127
Name ....................................................................................................................................................................................... 127
Opacity.................................................................................................................................................................................... 127
Parent ...................................................................................................................................................................................... 127
Position ................................................................................................................................................................................... 127
Selected .................................................................................................................................................................................. 127
Sliced ....................................................................................................................................................................................... 127
Tags.......................................................................................................................................................................................... 128
Top............................................................................................................................................................................................ 128
URL ........................................................................................................................................................................................... 128
VisibilityVariable .................................................................................................................................................................. 128
VisibleBounds....................................................................................................................................................................... 128
Width ....................................................................................................................................................................................... 128
WrapInside.....................................................................................................................
........................................................ 128
Adobe Illustrator CS2
Visual Basic Scripting Reference 15
WrapOffset............................................................................................................................................................................. 128
Wrapped................................................................................................................................................................................. 128
ZOrderPosition..................................................................................................................................................................... 128
GraphItem methods........................................................................................................................................................... 128
Copy......................................................................................................................................................................................... 128
Cut ............................................................................................................................................................................................ 128
Delete ...................................................................................................................................................................................... 128
Duplicate................................................................................................................................................................................ 128
Move ........................................................................................................................................................................................ 128
Resize....................................................................................................................................................................................... 129
Rotate ...................................................................................................................................................................................... 129
Transform............................................................................................................................................................................... 129
Translate................................................................................................................................................................................. 129
ZOrder..................................................................................................................................................................................... 129
GraphItems .................................................................................................................................................................................. 131
GraphItems properties...................................................................................................................................................... 131
Application ............................................................................................................................................................................ 131
Count....................................................................................................................................................................................... 131
Parent ...................................................................................................................................................................................... 131
GraphItems methods......................................................................................................................................................... 131
Index ........................................................................................................................................................................................ 131
Item .......................................................................................................................................................................................... 131
RemoveAll.............................................................................................................................................................................. 131
GrayColor...................................................................................................................................................................................... 132
GrayColor properties ......................................................................................................................................................... 132
Application ............................................................................................................................................................................ 132
Gray.......................................................................................................................................................................................... 132
GroupItem.................................................................................................................................................................................... 133
GroupItem properties........................................................................................................................................................ 133
Application ............................................................................................................................................................................ 133
ArtworkKnockout................................................................................................................................................................ 133
BlendingMode...................................................................................................................................................................... 133
Clipped.................................................................................................................................................................................... 133
CompoundPathItems ........................................................................................................................................................ 133
ControlBounds..................................................................................................................................................................... 133
Editable................................................................................................................................................................................... 133
GeometricBounds............................................................................................................................................................... 133
GraphItems............................................................................................................................................................................ 133
GroupItems ........................................................................................................................................................................... 133
Height...................................................................................................................................................................................... 133
Hidden..................................................................................................................................................................................... 133
IsIsolated ................................................................................................................................................................................ 133
Layer ........................................................................................................................................................................................ 133
Left............................................................................................................................................................................................ 133
LegacyTextItems ................................................................................................................................................................. 133
Locked..................................................................................................................................................................................... 133
MeshItems ............................................................................................................................................................................. 134
Name ....................................................................................................................................................................................... 134
Opacity.................................................................................................................................................................................... 134
PageItems .............................................................................................................................................................................. 134
Parent .........................................................................................................................
............................................................. 134
Adobe Illustrator CS2
Visual Basic Scripting Reference 16
PathItems ............................................................................................................................................................................... 134
PlacedItems........................................................................................................................................................................... 134
PluginItems ........................................................................................................................................................................... 134
Position ................................................................................................................................................................................... 134
RasterItems............................................................................................................................................................................ 134
Selected .................................................................................................................................................................................. 134
Sliced ....................................................................................................................................................................................... 134
SymbolItems ......................................................................................................................................................................... 134
Tags.......................................................................................................................................................................................... 134
TextFrames ............................................................................................................................................................................ 134
Top............................................................................................................................................................................................ 134
URL ........................................................................................................................................................................................... 134
VisibilityVariable .................................................................................................................................................................. 134
VisibleBounds....................................................................................................................................................................... 134
Width ....................................................................................................................................................................................... 134
WrapInside............................................................................................................................................................................. 134
WrapOffset............................................................................................................................................................................. 135
Wrapped................................................................................................................................................................................. 135
ZOrderPosition..................................................................................................................................................................... 135
GroupItem methods .......................................................................................................................................................... 135
Copy......................................................................................................................................................................................... 135
Cut ............................................................................................................................................................................................ 135
Delete ...................................................................................................................................................................................... 135
Duplicate................................................................................................................................................................................ 135
Move ........................................................................................................................................................................................ 135
Paste......................................................................................................................................................................................... 135
Resize....................................................................................................................................................................................... 135
Rotate ...................................................................................................................................................................................... 135
Transform............................................................................................................................................................................... 136
Translate................................................................................................................................................................................. 136
ZOrder..................................................................................................................................................................................... 136
GroupItems.................................................................................................................................................................................. 137
GroupItems properties...................................................................................................................................................... 137
Application ............................................................................................................................................................................ 137
Count....................................................................................................................................................................................... 137
Parent ...................................................................................................................................................................................... 137
GroupItems methods ........................................................................................................................................................ 137
Add........................................................................................................................................................................................... 137
CreateFromFile..................................................................................................................................................................... 137
Index ........................................................................................................................................................................................ 137
Item .......................................................................................................................................................................................... 137
RemoveAll.............................................................................................................................................................................. 137
IllustratorSaveOptions............................................................................................................................................................. 138
IllustratorSaveOptions properties................................................................................................................................. 138
Application ............................................................................................................................................................................ 138
Compatibility ........................................................................................................................................................................ 138
Compressed .......................................................................................................................................................................... 138
EmbedICCProfile ................................................................................................................................................................. 138
EmbedLinkedFiles............................................................................................................................................................... 138
FlattenOutput....................................................................................................................................................................... 138
FontSubsetThreshold ............................................................................................................
............................................ 138
Adobe Illustrator CS2
Visual Basic Scripting Reference 17
Overprint................................................................................................................................................................................ 138
PDFCompatible.................................................................................................................................................................... 138
Ink.................................................................................................................................................................................................... 139
Ink properties ....................................................................................................................................................................... 139
Application ............................................................................................................................................................................ 139
InkInfo ..................................................................................................................................................................................... 139
Name ....................................................................................................................................................................................... 139
InkInfo............................................................................................................................................................................................ 139
InkInfo properties................................................................................................................................................................ 139
Angle ....................................................................................................................................................................................... 139
Application ............................................................................................................................................................................ 139
CustomColor......................................................................................................................................................................... 139
Density .................................................................................................................................................................................... 139
DotShape ............................................................................................................................................................................... 139
Frequency .............................................................................................................................................................................. 139
Kind .......................................................................................................................................................................................... 139
PrintingStatus....................................................................................................................................................................... 139
Trapping................................................................................................................................................................................. 139
TrappingOrder ..................................................................................................................................................................... 139
InsertionPoint ............................................................................................................................................................................. 141
InsertionPoints ........................................................................................................................................................................... 141
InsertionPoints properties ............................................................................................................................................... 141
Application ............................................................................................................................................................................ 141
Count....................................................................................................................................................................................... 141
Parent ...................................................................................................................................................................................... 141
InsertionPoints methods .................................................................................................................................................. 141
Index ........................................................................................................................................................................................ 141
Item .......................................................................................................................................................................................... 141
LabColor ....................................................................................................................................................................................... 143
LabColor properties ........................................................................................................................................................... 143
A ................................................................................................................................................................................................ 143
B................................................................................................................................................................................................. 143
L ................................................................................................................................................................................................. 143
Name ....................................................................................................................................................................................... 143
Layer............................................................................................................................................................................................... 144
Layer properties................................................................................................................................................................... 144
Application ............................................................................................................................................................................ 144
ArtworkKnockout................................................................................................................................................................ 144
BlendingMode...................................................................................................................................................................... 144
Color......................................................................................................................................................................................... 144
CompoundPathItems ........................................................................................................................................................ 144
DimPlacedImages ............................................................................................................................................................... 144
GraphItems............................................................................................................................................................................ 144
GroupItems ........................................................................................................................................................................... 144
HasSelectedArtwork .......................................................................................................................................................... 144
IsIsolated ................................................................................................................................................................................ 144
Layers....................................................................................................................................................................................... 144
LegacyTextItems ................................................................................................................................................................. 144
Locked..................................................................................................................................................................................... 144
MeshItems ............................................................................................................................................................................. 144
Name ...........................................................................................................................
............................................................ 144
Adobe Illustrator CS2
Visual Basic Scripting Reference 18
Opacity.................................................................................................................................................................................... 144
PageItems .............................................................................................................................................................................. 144
Parent ...................................................................................................................................................................................... 144
PathItems ............................................................................................................................................................................... 145
PlacedItems........................................................................................................................................................................... 145
PluginItems ........................................................................................................................................................................... 145
Preview ................................................................................................................................................................................... 145
Printable ................................................................................................................................................................................. 145
RasterItems............................................................................................................................................................................ 145
Sliced ....................................................................................................................................................................................... 145
SymbolItems ......................................................................................................................................................................... 145
TextFrames ............................................................................................................................................................................ 145
Visible ...................................................................................................................................................................................... 145
ZOrderPosition..................................................................................................................................................................... 145
Layer methods ..................................................................................................................................................................... 145
Delete ...................................................................................................................................................................................... 145
Move ........................................................................................................................................................................................ 145
Paste......................................................................................................................................................................................... 145
ZOrder..................................................................................................................................................................................... 145
Layers............................................................................................................................................................................................. 147
Layers properties................................................................................................................................................................. 147
Application ............................................................................................................................................................................ 147
Count....................................................................................................................................................................................... 147
Parent ...................................................................................................................................................................................... 147
Layers methods.................................................................................................................................................................... 147
Add........................................................................................................................................................................................... 147
Index ........................................................................................................................................................................................ 147
RemoveAll.............................................................................................................................................................................. 147
LegacyTextItem.......................................................................................................................................................................... 149
LegacyTextItem properties ............................................................................................................................................. 149
Application ............................................................................................................................................................................ 149
ArtworkKnockout................................................................................................................................................................ 149
BlendingMode...................................................................................................................................................................... 149
ControlBounds..................................................................................................................................................................... 149
Converted .............................................................................................................................................................................. 149
Editable................................................................................................................................................................................... 149
GeometricBounds............................................................................................................................................................... 149
Height...................................................................................................................................................................................... 149
Hidden..................................................................................................................................................................................... 149
IsIsolated ................................................................................................................................................................................ 149
Layer ........................................................................................................................................................................................ 149
Left............................................................................................................................................................................................ 149
Locked..................................................................................................................................................................................... 149
Name ....................................................................................................................................................................................... 149
Opacity.................................................................................................................................................................................... 149
Parent ...................................................................................................................................................................................... 149
Position ................................................................................................................................................................................... 149
Selected .................................................................................................................................................................................. 149
Sliced ....................................................................................................................................................................................... 149
Tags.......................................................................................................................................................................................... 149
Top............................................................................................................................
................................................................ 149
Adobe Illustrator CS2
Visual Basic Scripting Reference 19
URL ........................................................................................................................................................................................... 150
VisibilityVariable .................................................................................................................................................................. 150
VisibleBounds....................................................................................................................................................................... 150
Width ....................................................................................................................................................................................... 150
WrapInside............................................................................................................................................................................. 150
WrapOffset............................................................................................................................................................................. 150
Wrapped................................................................................................................................................................................. 150
ZOrderPosition..................................................................................................................................................................... 150
LegacyTextItem methods ................................................................................................................................................ 150
ConvertToNative ................................................................................................................................................................. 150
Copy......................................................................................................................................................................................... 150
Cut ............................................................................................................................................................................................ 150
Duplicate................................................................................................................................................................................ 150
Delete ...................................................................................................................................................................................... 150
Move ........................................................................................................................................................................................ 150
Resize....................................................................................................................................................................................... 151
Rotate ...................................................................................................................................................................................... 151
Transform............................................................................................................................................................................... 151
Translate................................................................................................................................................................................. 151
ZOrder..................................................................................................................................................................................... 151
LegacyTextItems........................................................................................................................................................................ 152
LegacyTextItems properties............................................................................................................................................ 152
Application ............................................................................................................................................................................ 152
Count....................................................................................................................................................................................... 152
Parent ...................................................................................................................................................................................... 152
LegacyTextItems methods .............................................................................................................................................. 152
ConvertToNative ................................................................................................................................................................. 152
Index ........................................................................................................................................................................................ 152
Item .......................................................................................................................................................................................... 152
RemoveAll.............................................................................................................................................................................. 152
Lines ............................................................................................................................................................................................... 153
Lines properties ................................................................................................................................................................... 153
Application ............................................................................................................................................................................ 153
Count....................................................................................................................................................................................... 153
Parent ...................................................................................................................................................................................... 153
Lines methods...................................................................................................................................................................... 153
Index ........................................................................................................................................................................................ 153
Item .......................................................................................................................................................................................... 153
RemoveAll.............................................................................................................................................................................. 153
Matrix............................................................................................................................................................................................. 154
Matrix properties................................................................................................................................................................. 154
Application ............................................................................................................................................................................ 154
MValueA ................................................................................................................................................................................. 154
MValueB.................................................................................................................................................................................. 154
MValueC ................................................................................................................................................................................. 154
MValueD................................................................................................................................................................................. 154
MValueTX ............................................................................................................................................................................... 154
MValueTY ............................................................................................................................................................................... 154
MeshItem...................................................................................................................................................................................... 155
MeshItem properties ......................................................................................................................................................... 155
Application ....................................................................................................................
........................................................ 155
Adobe Illustrator CS2
Visual Basic Scripting Reference 20
ArtworkKnockout................................................................................................................................................................ 155
BlendingMode...................................................................................................................................................................... 155
ControlBounds..................................................................................................................................................................... 155
Editable................................................................................................................................................................................... 155
GeometricBounds............................................................................................................................................................... 155
Height...................................................................................................................................................................................... 155
Hidden..................................................................................................................................................................................... 155
IsIsolated ................................................................................................................................................................................ 155
Layer ........................................................................................................................................................................................ 155
Left............................................................................................................................................................................................ 155
Locked..................................................................................................................................................................................... 155
Name ....................................................................................................................................................................................... 155
Opacity.................................................................................................................................................................................... 155
Parent ...................................................................................................................................................................................... 155
Position ................................................................................................................................................................................... 155
Selected .................................................................................................................................................................................. 155
Sliced ....................................................................................................................................................................................... 155
Tags.......................................................................................................................................................................................... 155
Top............................................................................................................................................................................................ 155
URL ........................................................................................................................................................................................... 155
VisibilityVariable .................................................................................................................................................................. 155
VisibleBounds....................................................................................................................................................................... 155
Width ....................................................................................................................................................................................... 156
WrapInside............................................................................................................................................................................. 156
WrapOffset............................................................................................................................................................................. 156
Wrapped................................................................................................................................................................................. 156
ZOrderPosition..................................................................................................................................................................... 156
MeshItem methods ............................................................................................................................................................ 156
Copy......................................................................................................................................................................................... 156
Cut ............................................................................................................................................................................................ 156
Delete ...................................................................................................................................................................................... 156
Duplicate................................................................................................................................................................................ 156
Move ........................................................................................................................................................................................ 156
Resize....................................................................................................................................................................................... 156
Rotate ...................................................................................................................................................................................... 156
Transform............................................................................................................................................................................... 157
Translate................................................................................................................................................................................. 157
ZOrder..................................................................................................................................................................................... 157
MeshItems.................................................................................................................................................................................... 158
MeshItems properties........................................................................................................................................................ 158
Application ............................................................................................................................................................................ 158
Count....................................................................................................................................................................................... 158
Parent ...................................................................................................................................................................................... 158
MeshItems methods .......................................................................................................................................................... 158
Index ........................................................................................................................................................................................ 158
Item .......................................................................................................................................................................................... 158
RemoveAll.............................................................................................................................................................................. 158
NoColor......................................................................................................................................................................................... 160
NoColor properties............................................................................................................................................................. 160
Application ............................................................................................................................................................................ 160
OpenOptions ....................................................................................................................
.......................................................... 161
Adobe Illustrator CS2
Visual Basic Scripting Reference 21
OpenOptions properties .................................................................................................................................................. 161
Application ............................................................................................................................................................................ 161
UpdateLegacyText.............................................................................................................................................................. 161
PageItems..................................................................................................................................................................................... 162
PageItems properties ........................................................................................................................................................ 162
Application ............................................................................................................................................................................ 162
Count....................................................................................................................................................................................... 162
Parent ...................................................................................................................................................................................... 162
PageItems methods ........................................................................................................................................................... 162
Index ........................................................................................................................................................................................ 162
Item .......................................................................................................................................................................................... 162
RemoveAll.............................................................................................................................................................................. 162
Paper.............................................................................................................................................................................................. 164
Paper properties.................................................................................................................................................................. 164
Application ............................................................................................................................................................................ 164
Name ....................................................................................................................................................................................... 164
PaperInfo................................................................................................................................................................................ 164
PaperInfo ...................................................................................................................................................................................... 164
PaperInfo properties.......................................................................................................................................................... 164
Application ............................................................................................................................................................................ 164
CustomPaper ........................................................................................................................................................................ 164
Height...................................................................................................................................................................................... 164
ImageableArea..................................................................................................................................................................... 164
Width ....................................................................................................................................................................................... 164
ParagraphAttributes................................................................................................................................................................. 166
ParagraphAttributes properties .................................................................................................................................... 166
Application ............................................................................................................................................................................ 166
AutoLeadingAmount......................................................................................................................................................... 166
BunriKinshi............................................................................................................................................................................. 166
BurasagariType .................................................................................................................................................................... 166
DesiredGlyphScaling ......................................................................................................................................................... 166
DesiredLetterSpacing........................................................................................................................................................ 166
DesiredWordSpacing......................................................................................................................................................... 166
EveryLineComposer ........................................................................................................................................................... 166
FirstLineIndent..................................................................................................................................................................... 166
HyphenateCapitalizedWords.......................................................................................................................................... 166
Hyphenation ......................................................................................................................................................................... 166
HyphenationPreference ................................................................................................................................................... 166
HyphenationZone............................................................................................................................................................... 166
Justification ........................................................................................................................................................................... 166
Kinsoku ................................................................................................................................................................................... 166
KinsokuOrder........................................................................................................................................................................ 166
KurikaeshiMojiShori ........................................................................................................................................................... 167
LeadingType ......................................................................................................................................................................... 167
LeftIndent .............................................................................................................................................................................. 167
MaximumConsecutiveHyphens .................................................................................................................................... 167
MaximumGlyphScaling..................................................................................................................................................... 167
MaximumLetterSpacing ................................................................................................................................................... 167
MaximumWordSpacing .................................................................................................................................................... 167
MinimumAfterHyphen...................................................................................................................................................... 167
MinimumBeforeHyphen............................................................................................................
....................................... 167
Adobe Illustrator CS2
Visual Basic Scripting Reference 22
MinimumGlyphScaling ..................................................................................................................................................... 167
MinimumHyphenatedWordSize.................................................................................................................................... 167
MinimumLetterSpacing.................................................................................................................................................... 167
MinimumWordSpacing..................................................................................................................................................... 167
Mojikumi ................................................................................................................................................................................ 167
Parent ...................................................................................................................................................................................... 167
RightIndent ........................................................................................................................................................................... 167
RomanHanging.................................................................................................................................................................... 167
SingleWordJustification.................................................................................................................................................... 167
SpaceAfter ............................................................................................................................................................................. 167
SpaceBefore .......................................................................................................................................................................... 167
TabStops................................................................................................................................................................................. 167
Paragraphs................................................................................................................................................................................... 169
Paragraphs properties....................................................................................................................................................... 169
Application ............................................................................................................................................................................ 169
Count....................................................................................................................................................................................... 169
Parent ...................................................................................................................................................................................... 169
Paragraphs methods.......................................................................................................................................................... 169
Add........................................................................................................................................................................................... 169
AddBefore.............................................................................................................................................................................. 169
Index ........................................................................................................................................................................................ 169
Item .......................................................................................................................................................................................... 169
RemoveAll.............................................................................................................................................................................. 169
ParagraphStyle........................................................................................................................................................................... 171
ParagraphStyle properties............................................................................................................................................... 171
Application ............................................................................................................................................................................ 171
CharacterAttributes............................................................................................................................................................ 171
Name ....................................................................................................................................................................................... 171
ParagraphAttributes .......................................................................................................................................................... 171
Parent ...................................................................................................................................................................................... 171
ParagraphStyle methods.................................................................................................................................................. 171
ApplyTo .................................................................................................................................................................................. 171
Delete ...................................................................................................................................................................................... 171
ParagraphStyles ......................................................................................................................................................................... 173
ParagraphStyles properties............................................................................................................................................. 173
Application ............................................................................................................................................................................ 173
Count....................................................................................................................................................................................... 173
Parent ...................................................................................................................................................................................... 173
ParagraphStyles methods................................................................................................................................................ 173
Add........................................................................................................................................................................................... 173
Index ........................................................................................................................................................................................ 173
Item .......................................................................................................................................................................................... 173
RemoveAll.............................................................................................................................................................................. 173
PathItem ....................................................................................................................................................................................... 174
PathItem properties ........................................................................................................................................................... 174
Application ............................................................................................................................................................................ 174
Area.......................................................................................................................................................................................... 174
ArtworkKnockout................................................................................................................................................................ 174
BlendingMode...................................................................................................................................................................... 174
Clipping .................................................................................................................................................................................. 174
Closed.........................................................................................................................
............................................................. 174
Adobe Illustrator CS2
Visual Basic Scripting Reference 23
ControlBounds..................................................................................................................................................................... 174
Editable................................................................................................................................................................................... 174
Evenodd ................................................................................................................................................................................. 174
FillColor................................................................................................................................................................................... 174
Filled ........................................................................................................................................................................................ 174
FillOverprint .......................................................................................................................................................................... 174
GeometricBounds............................................................................................................................................................... 174
Guides ..................................................................................................................................................................................... 174
Height...................................................................................................................................................................................... 174
Hidden..................................................................................................................................................................................... 174
IsIsolated ................................................................................................................................................................................ 174
Layer ........................................................................................................................................................................................ 174
Left............................................................................................................................................................................................ 174
Locked..................................................................................................................................................................................... 174
Name ....................................................................................................................................................................................... 175
Note ......................................................................................................................................................................................... 175
Opacity.................................................................................................................................................................................... 175
Parent ...................................................................................................................................................................................... 175
PathPoints.............................................................................................................................................................................. 175
Polarity .................................................................................................................................................................................... 175
Position ................................................................................................................................................................................... 175
Resolution.............................................................................................................................................................................. 175
Selected .................................................................................................................................................................................. 175
SelectedPathPoints ............................................................................................................................................................ 175
Sliced ....................................................................................................................................................................................... 175
StrokeCap............................................................................................................................................................................... 175
StrokeColor............................................................................................................................................................................ 175
Stroked.................................................................................................................................................................................... 175
StrokeDashes........................................................................................................................................................................ 175
StrokeDashOffset ................................................................................................................................................................ 175
StrokeJoin .............................................................................................................................................................................. 175
StrokeMiterLimit.................................................................................................................................................................. 175
StrokeOverprint................................................................................................................................................................... 175
StrokeWidth .......................................................................................................................................................................... 175
Tags.......................................................................................................................................................................................... 175
Top............................................................................................................................................................................................ 175
URL ........................................................................................................................................................................................... 175
VisibilityVariable .................................................................................................................................................................. 176
VisibleBounds....................................................................................................................................................................... 176
Width ....................................................................................................................................................................................... 176
WrapInside............................................................................................................................................................................. 176
WrapOffset............................................................................................................................................................................. 176
Wrapped................................................................................................................................................................................. 176
ZOrderPosition..................................................................................................................................................................... 176
PathItem methods.............................................................................................................................................................. 176
Copy......................................................................................................................................................................................... 176
Cut ............................................................................................................................................................................................ 176
Delete ...................................................................................................................................................................................... 176
Duplicate................................................................................................................................................................................ 176
Move ........................................................................................................................................................................................ 176
Resize.........................................................................................................................
.............................................................. 176
Adobe Illustrator CS2
Visual Basic Scripting Reference 24
Rotate ...................................................................................................................................................................................... 177
SetEntirePath........................................................................................................................................................................ 177
Transform............................................................................................................................................................................... 177
Translate................................................................................................................................................................................. 177
ZOrder..................................................................................................................................................................................... 177
PathItems ..................................................................................................................................................................................... 179
PathItems properties ......................................................................................................................................................... 179
Application ............................................................................................................................................................................ 179
Count....................................................................................................................................................................................... 179
Parent ...................................................................................................................................................................................... 179
PathItems methods ............................................................................................................................................................ 179
Add........................................................................................................................................................................................... 179
Ellipse ...................................................................................................................................................................................... 179
Index ........................................................................................................................................................................................ 179
Item .......................................................................................................................................................................................... 179
Polygon................................................................................................................................................................................... 179
Rectangle ............................................................................................................................................................................... 179
RemoveAll.............................................................................................................................................................................. 179
RoundedRectangle............................................................................................................................................................. 180
Star ........................................................................................................................................................................................... 180
PathPoint...................................................................................................................................................................................... 181
PathPoint properties.......................................................................................................................................................... 181
Anchor..................................................................................................................................................................................... 181
Application ............................................................................................................................................................................ 181
LeftDirection ......................................................................................................................................................................... 181
Parent ...................................................................................................................................................................................... 181
PointType............................................................................................................................................................................... 181
RightDirection ...................................................................................................................................................................... 181
Selected .................................................................................................................................................................................. 181
PathPoint methods ............................................................................................................................................................ 181
Delete ...................................................................................................................................................................................... 181
PathPoints.................................................................................................................................................................................... 183
PathPoints properties........................................................................................................................................................ 183
Application ............................................................................................................................................................................ 183
Count....................................................................................................................................................................................... 183
Parent ...................................................................................................................................................................................... 183
PathPoints methods........................................................................................................................................................... 183
Add........................................................................................................................................................................................... 183
Index ........................................................................................................................................................................................ 183
Item .......................................................................................................................................................................................... 183
RemoveAll.............................................................................................................................................................................. 183
Pattern........................................................................................................................................................................................... 184
Pattern properties............................................................................................................................................................... 184
Application ............................................................................................................................................................................ 184
Name ....................................................................................................................................................................................... 184
Parent ...................................................................................................................................................................................... 184
Pattern methods.................................................................................................................................................................. 184
Delete ...................................................................................................................................................................................... 184
PatternColor ................................................................................................................................................................................ 185
PatternColor properties.................................................................................................................................................... 185
Application ....................................................................................................................
........................................................ 185
Adobe Illustrator CS2
Visual Basic Scripting Reference 25
Matrix....................................................................................................................................................................................... 185
Pattern..................................................................................................................................................................................... 185
Reflect...................................................................................................................................................................................... 185
ReflectAngle.......................................................................................................................................................................... 185
Rotation .................................................................................................................................................................................. 185
ScaleFactor ............................................................................................................................................................................ 185
ShearAngle............................................................................................................................................................................ 185
ShearAxis................................................................................................................................................................................ 185
ShiftAngle .............................................................................................................................................................................. 185
ShiftDistance......................................................................................................................................................................... 185
Patterns......................................................................................................................................................................................... 187
Patterns properties............................................................................................................................................................. 187
Application ............................................................................................................................................................................ 187
Count....................................................................................................................................................................................... 187
Parent ...................................................................................................................................................................................... 187
Patterns methods................................................................................................................................................................ 187
Add........................................................................................................................................................................................... 187
Index ........................................................................................................................................................................................ 187
Item .......................................................................................................................................................................................... 187
RemoveAll.............................................................................................................................................................................. 187
PDFFileOptions .......................................................................................................................................................................... 188
PDFFileOptions properties .............................................................................................................................................. 188
Application ............................................................................................................................................................................ 188
PageToOpen ......................................................................................................................................................................... 188
Parent ...................................................................................................................................................................................... 188
PDFCropToBox..................................................................................................................................................................... 188
PDFSaveOptions ........................................................................................................................................................................ 189
PDFSaveOptions properties............................................................................................................................................ 189
AcrobatLayers....................................................................................................................................................................... 189
Application ............................................................................................................................................................................ 189
BleedLink................................................................................................................................................................................ 189
BleedOffsetRect ................................................................................................................................................................... 189
ColorBars ................................................................................................................................................................................ 189
ColorCompression .............................................................................................................................................................. 189
ColorConversionID ............................................................................................................................................................. 189
ColorDestinationID............................................................................................................................................................. 189
ColorDownsampling.......................................................................................................................................................... 189
ColorDownsamplingImage- Threshold ...................................................................................................................... 189
ColorDownsamplingMethod.......................................................................................................................................... 189
ColorProfileID ....................................................................................................................................................................... 189
ColorTileSize ......................................................................................................................................................................... 189
Compatibility ........................................................................................................................................................................ 189
CompressArt ......................................................................................................................................................................... 189
DocumentPassword........................................................................................................................................................... 189
EnableAccess ........................................................................................................................................................................ 190
EnableCopy ........................................................................................................................................................................... 190
EnableCopyAccess.............................................................................................................................................................. 190
EnablePlainText ................................................................................................................................................................... 190
FlattenerOptions ................................................................................................................................................................. 190
FlattenerPreset..................................................................................................................................................................... 190
FontSubsetThreshold ............................................................................................................
............................................ 190
Adobe Illustrator CS2
Visual Basic Scripting Reference 26
GenerateThumbnails ......................................................................................................................................................... 190
GrayscaleCompression...................................................................................................................................................... 190
GrayscaleDownsampling ................................................................................................................................................. 190
GrayscaleDownsampling- ImageThreshold .............................................................................................................. 190
GrayscaleDownsampling- Method............................................................................................................................... 190
GrayscaleTileSize................................................................................................................................................................. 190
MonochromeCompression ............................................................................................................................................. 190
MonochromeDownsampling ......................................................................................................................................... 190
MonochromeDownsampling- ImageThreshold...................................................................................................... 190
MonochromeDownsampling- Method....................................................................................................................... 190
Offset ....................................................................................................................................................................................... 191
Optimization......................................................................................................................................................................... 191
OutputCondition................................................................................................................................................................. 191
OutputConditionID ............................................................................................................................................................ 191
PageInformation ................................................................................................................................................................. 191
PageMarksType.................................................................................................................................................................... 191
PDFAllowPrinting................................................................................................................................................................ 191
PDFChangesAllowed ......................................................................................................................................................... 191
PDFPreset............................................................................................................................................................................... 191
PDFXStandard ...................................................................................................................................................................... 191
PDFXStandardDescription............................................................................................................................................... 191
PermissionPassword .......................................................................................................................................................... 191
PreserveEditability.............................................................................................................................................................. 191
PrinterResolution ................................................................................................................................................................ 191
RegistrationMarks ............................................................................................................................................................... 191
RequireDocumentPassword ........................................................................................................................................... 191
RequirePermissionPassword........................................................................................................................................... 191
Trapped .................................................................................................................................................................................. 191
TrimMarks .............................................................................................................................................................................. 192
TrimMarkWeight.................................................................................................................................................................. 192
ViewAfterSaving .................................................................................................................................................................. 192
PhotoshopFileOptions ............................................................................................................................................................ 193
PhotoshopFileOptions properties ................................................................................................................................ 193
Application ............................................................................................................................................................................ 193
Parent ...................................................................................................................................................................................... 193
PixelAspectRatioCorrection ............................................................................................................................................ 193
PreserveImageMaps........................................................................................................................................................... 193
PreserveLayers ..................................................................................................................................................................... 193
PreserveSlices....................................................................................................................................................................... 193
PlacedItem ................................................................................................................................................................................... 194
PlacedItem properties....................................................................................................................................................... 194
Application ............................................................................................................................................................................ 194
ArtworkKnockout................................................................................................................................................................ 194
BlendingMode...................................................................................................................................................................... 194
BoundingBox........................................................................................................................................................................ 194
ContentVariable................................................................................................................................................................... 194
ControlBounds..................................................................................................................................................................... 194
Editable................................................................................................................................................................................... 194
File ............................................................................................................................................................................................ 194
GeometricBounds............................................................................................................................................................... 194
Height.........................................................................................................................
............................................................. 194
Adobe Illustrator CS2
Visual Basic Scripting Reference 27
Hidden..................................................................................................................................................................................... 194
IsIsolated ................................................................................................................................................................................ 194
Layer ........................................................................................................................................................................................ 194
Left............................................................................................................................................................................................ 194
Locked..................................................................................................................................................................................... 194
Matrix....................................................................................................................................................................................... 194
Name ....................................................................................................................................................................................... 195
Opacity.................................................................................................................................................................................... 195
Parent ...................................................................................................................................................................................... 195
Position ................................................................................................................................................................................... 195
Selected .................................................................................................................................................................................. 195
Sliced ....................................................................................................................................................................................... 195
Tags.......................................................................................................................................................................................... 195
Top............................................................................................................................................................................................ 195
URL ........................................................................................................................................................................................... 195
VisibilityVariable .................................................................................................................................................................. 195
VisibleBounds....................................................................................................................................................................... 195
Width ....................................................................................................................................................................................... 195
WrapInside............................................................................................................................................................................. 195
WrapOffset............................................................................................................................................................................. 195
Wrapped................................................................................................................................................................................. 195
ZOrderPosition..................................................................................................................................................................... 195
PlacedItem methods.......................................................................................................................................................... 195
Copy......................................................................................................................................................................................... 195
Cut ............................................................................................................................................................................................ 195
Delete ...................................................................................................................................................................................... 195
Duplicate................................................................................................................................................................................ 196
Embed..................................................................................................................................................................................... 196
Resize....................................................................................................................................................................................... 196
Rotate ...................................................................................................................................................................................... 196
Transform............................................................................................................................................................................... 196
Translate................................................................................................................................................................................. 196
ZOrder..................................................................................................................................................................................... 196
PlacedItems ................................................................................................................................................................................. 197
PlacedItems properties ..................................................................................................................................................... 197
Application ............................................................................................................................................................................ 197
Count....................................................................................................................................................................................... 197
Parent ...................................................................................................................................................................................... 197
PlacedItems methods........................................................................................................................................................ 197
Add........................................................................................................................................................................................... 197
Index ........................................................................................................................................................................................ 197
Item .......................................................................................................................................................................................... 197
RemoveAll.............................................................................................................................................................................. 197
PluginItem.................................................................................................................................................................................... 198
PluginItem properties ....................................................................................................................................................... 198
Application ............................................................................................................................................................................ 198
ArtworkKnockout................................................................................................................................................................ 198
BlendingMode...................................................................................................................................................................... 198
ControlBounds..................................................................................................................................................................... 198
Editable................................................................................................................................................................................... 198
GeometricBounds................................................................................................................
............................................... 198
Adobe Illustrator CS2
Visual Basic Scripting Reference 28
Height...................................................................................................................................................................................... 198
Hidden..................................................................................................................................................................................... 198
IsIsolated ................................................................................................................................................................................ 198
IsTracing ................................................................................................................................................................................. 198
Layer ........................................................................................................................................................................................ 198
Left............................................................................................................................................................................................ 198
Locked..................................................................................................................................................................................... 198
Name ....................................................................................................................................................................................... 198
Opacity.................................................................................................................................................................................... 198
Parent ...................................................................................................................................................................................... 198
Position ................................................................................................................................................................................... 198
Selected .................................................................................................................................................................................. 198
Sliced ....................................................................................................................................................................................... 198
Tags.......................................................................................................................................................................................... 198
Top............................................................................................................................................................................................ 198
Tracing .................................................................................................................................................................................... 199
URL ........................................................................................................................................................................................... 199
VisibilityVariable .................................................................................................................................................................. 199
VisibleBounds....................................................................................................................................................................... 199
Width ....................................................................................................................................................................................... 199
WrapInside............................................................................................................................................................................. 199
WrapOffset............................................................................................................................................................................. 199
Wrapped................................................................................................................................................................................. 199
ZOrderPosition..................................................................................................................................................................... 199
PluginItem methods .......................................................................................................................................................... 199
Copy......................................................................................................................................................................................... 199
Cut ............................................................................................................................................................................................ 199
Delete ...................................................................................................................................................................................... 199
Duplicate................................................................................................................................................................................ 199
Move ........................................................................................................................................................................................ 199
Resize....................................................................................................................................................................................... 200
Rotate ...................................................................................................................................................................................... 200
Trace ........................................................................................................................................................................................ 200
Transform............................................................................................................................................................................... 200
Translate................................................................................................................................................................................. 200
ZOrder..................................................................................................................................................................................... 200
PluginItems.................................................................................................................................................................................. 202
PluginItems properties...................................................................................................................................................... 202
Application ............................................................................................................................................................................ 202
Count....................................................................................................................................................................................... 202
Parent ...................................................................................................................................................................................... 202
PluginItems methods ........................................................................................................................................................ 202
Index ........................................................................................................................................................................................ 202
Item .......................................................................................................................................................................................... 202
RemoveAll.............................................................................................................................................................................. 202
PPDFile .......................................................................................................................................................................................... 203
PPDFile properties .............................................................................................................................................................. 203
Application ............................................................................................................................................................................ 203
Name ....................................................................................................................................................................................... 203
PPDInfo................................................................................................................................................................................... 203
PPDFileInfo ....................................................................................................................
.............................................................. 203
Adobe Illustrator CS2
Visual Basic Scripting Reference 29
PPDFileInfo properties ...................................................................................................................................................... 203
Application ............................................................................................................................................................................ 203
LanguageLevel..................................................................................................................................................................... 203
PPDFilePath........................................................................................................................................................................... 203
ScreenList............................................................................................................................................................................... 203
ScreenSpotFunctionList ................................................................................................................................................... 203
Preferences.................................................................................................................................................................................. 205
Preferences properties...................................................................................................................................................... 205
Application ............................................................................................................................................................................ 205
Parent ...................................................................................................................................................................................... 205
PDFFileOptions .................................................................................................................................................................... 205
PhotoshopFileOptions ...................................................................................................................................................... 205
PrintColorManagementOptions .......................................................................................................................................... 206
PrintColorManagementOptions properties .............................................................................................................. 206
Application ............................................................................................................................................................................ 206
ColorProfileMode................................................................................................................................................................ 206
Intent ....................................................................................................................................................................................... 206
Name ....................................................................................................................................................................................... 206
PrintColorSeparationOptions ............................................................................................................................................... 207
PrintColorSeparationOptions properties ................................................................................................................... 207
Application ............................................................................................................................................................................ 207
ColorSeparationMode ....................................................................................................................................................... 207
ConvertSpotColors ............................................................................................................................................................. 207
InkList ...................................................................................................................................................................................... 207
OverPrintBlack...................................................................................................................................................................... 207
PrintCoordinateOptions ......................................................................................................................................................... 209
PrintCoordinateOptions properties ............................................................................................................................. 209
Application ............................................................................................................................................................................ 209
Emulsion................................................................................................................................................................................. 209
FitToPage ............................................................................................................................................................................... 209
HorizontalScale.................................................................................................................................................................... 209
Orientation ............................................................................................................................................................................ 209
Position ................................................................................................................................................................................... 209
Tiling ........................................................................................................................................................................................ 209
VerticalScale.......................................................................................................................................................................... 209
Printer ............................................................................................................................................................................................ 211
Printer properties................................................................................................................................................................ 211
Application ............................................................................................................................................................................ 211
Name ....................................................................................................................................................................................... 211
PrinterInfo.............................................................................................................................................................................. 211
PrinterInfo .................................................................................................................................................................................... 211
PrinterInfo properties ........................................................................................................................................................ 211
Application ............................................................................................................................................................................ 211
BinaryPrintingSupport ...................................................................................................................................................... 211
ColorSupport ........................................................................................................................................................................ 211
CustomPaperSupport........................................................................................................................................................ 211
CustomPaperTransverse-Support................................................................................................................................. 211
DeviceResolution ................................................................................................................................................................ 211
InRIPSeparationSupport ................................................................................................................................................... 211
MaxDeviceResolution........................................................................................................................................................ 211
MaxPaperHeight.................................................................................................................
................................................. 211
Adobe Illustrator CS2
Visual Basic Scripting Reference 30
MaxPaperHeightOffset ..................................................................................................................................................... 211
MaxPaperWidth ................................................................................................................................................................... 211
MaxPaperWidthOffset....................................................................................................................................................... 211
MinPaperHeight .................................................................................................................................................................. 211
MinPaperHeightOffset ...................................................................................................................................................... 211
MinPaperWidth.................................................................................................................................................................... 211
MinPaperWidthOffset........................................................................................................................................................ 211
PaperSizes.............................................................................................................................................................................. 212
PostScriptLevel .................................................................................................................................................................... 212
PrinterType............................................................................................................................................................................ 212
PrintFlattenerOptions.............................................................................................................................................................. 214
PrintFlattenerOptions properties.................................................................................................................................. 214
Application ............................................................................................................................................................................ 214
ClipComplexRegions ......................................................................................................................................................... 214
ConvertStrokesToOutlines............................................................................................................................................... 214
ConvertTextToOutlines..................................................................................................................................................... 214
FlatteningBalance ............................................................................................................................................................... 214
GradientResolution ............................................................................................................................................................ 214
Overprint................................................................................................................................................................................ 214
RasterizationResolution.................................................................................................................................................... 214
PrintFontOptions....................................................................................................................................................................... 216
PrintFontOptions properties........................................................................................................................................... 216
Application ............................................................................................................................................................................ 216
DownloadFonts ................................................................................................................................................................... 216
FontSubstitution ................................................................................................................................................................. 216
PrintJobOptions......................................................................................................................................................................... 217
PrintJobOptions properties............................................................................................................................................. 217
Application ............................................................................................................................................................................ 217
BitmapResolution ............................................................................................................................................................... 217
Collate ..................................................................................................................................................................................... 217
Copies...................................................................................................................................................................................... 217
Designation........................................................................................................................................................................... 217
File ............................................................................................................................................................................................ 217
Name ....................................................................................................................................................................................... 217
PrintArea ................................................................................................................................................................................ 217
PrintAsBitmap ...................................................................................................................................................................... 217
ReversePages........................................................................................................................................................................ 217
PrintOptions ................................................................................................................................................................................ 219
PrintOptions properties.................................................................................................................................................... 219
Application ............................................................................................................................................................................ 219
ColorManagementOptions ............................................................................................................................................. 219
ColorSeparationOptions................................................................................................................................................... 219
CoordinateOptions............................................................................................................................................................. 219
FlattenerOptions ................................................................................................................................................................. 219
FlattenerPreset..................................................................................................................................................................... 219
FontOptions .......................................................................................................................................................................... 219
JobOptions ............................................................................................................................................................................ 219
PageMarksOptions ............................................................................................................................................................. 219
PaperOptions........................................................................................................................................................................ 219
PostScriptOptions............................................................................................................................................................... 219
PPDName ........................................................................................................................
....................................................... 219
Adobe Illustrator CS2
Visual Basic Scripting Reference 31
PrinterName.......................................................................................................................................................................... 219
PrintPreset ............................................................................................................................................................................. 219
PrintPageMarksOptions .......................................................................................................................................................... 221
PrintPageMarksOptions properties .............................................................................................................................. 221
Application ............................................................................................................................................................................ 221
BleedOffsetRect ................................................................................................................................................................... 221
ColorBars ................................................................................................................................................................................ 221
MarksOffsetRect................................................................................................................................................................... 221
PageInfoMarks ..................................................................................................................................................................... 221
PageMarksType.................................................................................................................................................................... 221
RegistrationMarks ............................................................................................................................................................... 221
TrimMarks .............................................................................................................................................................................. 221
TrimMarksWeight................................................................................................................................................................ 221
PrintPaperOptions .................................................................................................................................................................... 223
PrintPaperOptions properties ........................................................................................................................................ 223
Application ............................................................................................................................................................................ 223
Height...................................................................................................................................................................................... 223
Name ....................................................................................................................................................................................... 223
Offset ....................................................................................................................................................................................... 223
Transverse.............................................................................................................................................................................. 223
Width ....................................................................................................................................................................................... 223
PrintPostScriptOptions............................................................................................................................................................ 224
PrintPostScriptOptions properties................................................................................................................................ 224
Application ............................................................................................................................................................................ 224
BinaryPrinting....................................................................................................................................................................... 224
CompatibleShading ........................................................................................................................................................... 224
ForceContinuousTone....................................................................................................................................................... 224
ImageCompression ............................................................................................................................................................ 224
NegativePrinting ................................................................................................................................................................. 224
PostScriptLevel .................................................................................................................................................................... 224
ShadingResolution ............................................................................................................................................................. 224
RasterItem.................................................................................................................................................................................... 226
RasterItem properties........................................................................................................................................................ 226
Application ............................................................................................................................................................................ 226
ArtworkKnockout................................................................................................................................................................ 226
BlendingMode...................................................................................................................................................................... 226
BoundingBox........................................................................................................................................................................ 226
ContentVariable................................................................................................................................................................... 226
ControlBounds..................................................................................................................................................................... 226
Editable................................................................................................................................................................................... 226
Embedded ............................................................................................................................................................................. 226
File ............................................................................................................................................................................................ 226
GeometricBounds............................................................................................................................................................... 226
Height...................................................................................................................................................................................... 226
Hidden..................................................................................................................................................................................... 226
ImageColorSpace................................................................................................................................................................ 226
IsIsolated ................................................................................................................................................................................ 226
Layer ........................................................................................................................................................................................ 226
Left............................................................................................................................................................................................ 226
Locked..................................................................................................................................................................................... 226
Matrix.........................................................................................................................
.............................................................. 226
Adobe Illustrator CS2
Visual Basic Scripting Reference 32
Name ....................................................................................................................................................................................... 226
Opacity.................................................................................................................................................................................... 226
Parent ...................................................................................................................................................................................... 226
Position ................................................................................................................................................................................... 226
Selected .................................................................................................................................................................................. 227
Sliced ....................................................................................................................................................................................... 227
Status....................................................................................................................................................................................... 227
Tags.......................................................................................................................................................................................... 227
Top............................................................................................................................................................................................ 227
URL ........................................................................................................................................................................................... 227
VisibilityVariable .................................................................................................................................................................. 227
VisibleBounds....................................................................................................................................................................... 227
Width ....................................................................................................................................................................................... 227
WrapInside............................................................................................................................................................................. 227
WrapOffset............................................................................................................................................................................. 227
Wrapped................................................................................................................................................................................. 227
ZOrderPosition..................................................................................................................................................................... 227
RasterItem methods........................................................................................................................................................... 227
Colorize................................................................................................................................................................................... 227
Copy......................................................................................................................................................................................... 227
Cut ............................................................................................................................................................................................ 227
Delete ...................................................................................................................................................................................... 227
Duplicate................................................................................................................................................................................ 227
Move ........................................................................................................................................................................................ 228
Resize....................................................................................................................................................................................... 228
Rotate ...................................................................................................................................................................................... 228
Trace ........................................................................................................................................................................................ 228
Transform............................................................................................................................................................................... 228
Translate................................................................................................................................................................................. 228
ZOrder..................................................................................................................................................................................... 228
RasterItems .................................................................................................................................................................................. 229
RasterItems properties...................................................................................................................................................... 229
Application ............................................................................................................................................................................ 229
Count....................................................................................................................................................................................... 229
Parent ...................................................................................................................................................................................... 229
RasterItems methods......................................................................................................................................................... 229
Add........................................................................................................................................................................................... 229
Index ........................................................................................................................................................................................ 229
Item .......................................................................................................................................................................................... 229
RemoveAll.............................................................................................................................................................................. 229
RGBColor....................................................................................................................................................................................... 230
RGBColor properties .......................................................................................................................................................... 230
Application ............................................................................................................................................................................ 230
Blue........................................................................................................................................................................................... 230
Green ....................................................................................................................................................................................... 230
Red............................................................................................................................................................................................ 230
Screen............................................................................................................................................................................................ 231
Screen properties................................................................................................................................................................ 231
Application ............................................................................................................................................................................ 231
Name ....................................................................................................................................................................................... 231
ScreenInfo.....................................................................................................................
......................................................... 231
Adobe Illustrator CS2
Visual Basic Scripting Reference 33
ScreenInfo .................................................................................................................................................................................... 231
ScreenInfo properties........................................................................................................................................................ 231
Angle ....................................................................................................................................................................................... 231
Application ............................................................................................................................................................................ 231
DefaultScreen....................................................................................................................................................................... 231
Frequency .............................................................................................................................................................................. 231
ScreenSpotFunction................................................................................................................................................................. 233
ScreenSpotFunction properties..................................................................................................................................... 233
Application ............................................................................................................................................................................ 233
Name ....................................................................................................................................................................................... 233
SpotFunction ........................................................................................................................................................................ 233
Spot ................................................................................................................................................................................................ 234
Spot properties .................................................................................................................................................................... 234
Application ............................................................................................................................................................................ 234
Color......................................................................................................................................................................................... 234
ColorType............................................................................................................................................................................... 234
Name ....................................................................................................................................................................................... 234
Parent ...................................................................................................................................................................................... 234
Spot methods....................................................................................................................................................................... 234
Delete ...................................................................................................................................................................................... 234
SpotColor ..................................................................................................................................................................................... 235
SpotColor properties ......................................................................................................................................................... 235
Application ............................................................................................................................................................................ 235
Spot.......................................................................................................................................................................................... 235
Tint............................................................................................................................................................................................ 235
Spots .............................................................................................................................................................................................. 236
Spots properties .................................................................................................................................................................. 236
Application ............................................................................................................................................................................ 236
Count....................................................................................................................................................................................... 236
Parent ...................................................................................................................................................................................... 236
Spots methods ..................................................................................................................................................................... 236
Add........................................................................................................................................................................................... 236
Index ........................................................................................................................................................................................ 236
Item .......................................................................................................................................................................................... 236
RemoveAll.............................................................................................................................................................................. 236
Story ............................................................................................................................................................................................... 237
Story properties ................................................................................................................................................................... 237
Application ............................................................................................................................................................................ 237
Characters.............................................................................................................................................................................. 237
InsertionPoints..................................................................................................................................................................... 237
Length..................................................................................................................................................................................... 237
Lines......................................................................................................................................................................................... 237
Paragraphs............................................................................................................................................................................. 237
Parent ...................................................................................................................................................................................... 237
TextFrames ............................................................................................................................................................................ 237
TextRange.............................................................................................................................................................................. 237
TextRanges ............................................................................................................................................................................ 237
TextSelection ........................................................................................................................................................................ 237
Words ...................................................................................................................................................................................... 237
Stories............................................................................................................................................................................................ 239
Stories properties.............................................................................................................
................................................... 239
Adobe Illustrator CS2
Visual Basic Scripting Reference 34
Application ............................................................................................................................................................................ 239
Count....................................................................................................................................................................................... 239
Parent ...................................................................................................................................................................................... 239
Stories methods................................................................................................................................................................... 239
Index ........................................................................................................................................................................................ 239
Item .......................................................................................................................................................................................... 239
Swatch........................................................................................................................................................................................... 240
Swatch properties............................................................................................................................................................... 240
Application ............................................................................................................................................................................ 240
Color......................................................................................................................................................................................... 240
Name ....................................................................................................................................................................................... 240
Parent ...................................................................................................................................................................................... 240
Swatch methods.................................................................................................................................................................. 240
Delete ...................................................................................................................................................................................... 240
Swatches....................................................................................................................................................................................... 241
Swatches properties .......................................................................................................................................................... 241
Application ............................................................................................................................................................................ 241
Count....................................................................................................................................................................................... 241
Parent ...................................................................................................................................................................................... 241
Swatches methods ............................................................................................................................................................. 241
Add........................................................................................................................................................................................... 241
Index ........................................................................................................................................................................................ 241
Item .......................................................................................................................................................................................... 241
RemoveAll.............................................................................................................................................................................. 241
Symbol .......................................................................................................................................................................................... 242
Symbol properties .............................................................................................................................................................. 242
Application ............................................................................................................................................................................ 242
Name ....................................................................................................................................................................................... 242
Parent ...................................................................................................................................................................................... 242
Symbol methods ................................................................................................................................................................. 242
Delete ...................................................................................................................................................................................... 242
Duplicate................................................................................................................................................................................ 242
Symbols......................................................................................................................................................................................... 243
Symbols properties ............................................................................................................................................................ 243
Application ............................................................................................................................................................................ 243
Count....................................................................................................................................................................................... 243
Parent ...................................................................................................................................................................................... 243
Symbols methods ............................................................................................................................................................... 243
Add........................................................................................................................................................................................... 243
Index ........................................................................................................................................................................................ 243
Item .......................................................................................................................................................................................... 243
RemoveAll.............................................................................................................................................................................. 243
SymbolItem ................................................................................................................................................................................. 245
SymbolItem properties ..................................................................................................................................................... 245
Application ............................................................................................................................................................................ 245
ArtworkKnockout................................................................................................................................................................ 245
BlendingMode...................................................................................................................................................................... 245
ControlBounds..................................................................................................................................................................... 245
Editable................................................................................................................................................................................... 245
GeometricBounds............................................................................................................................................................... 245
Height.........................................................................................................................
............................................................. 245
Adobe Illustrator CS2
Visual Basic Scripting Reference 35
Hidden..................................................................................................................................................................................... 245
IsIsolated ................................................................................................................................................................................ 245
Layer ........................................................................................................................................................................................ 245
Left............................................................................................................................................................................................ 245
Locked..................................................................................................................................................................................... 245
Name ....................................................................................................................................................................................... 245
Opacity.................................................................................................................................................................................... 245
Parent ...................................................................................................................................................................................... 245
Position ................................................................................................................................................................................... 245
Selected .................................................................................................................................................................................. 245
Sliced ....................................................................................................................................................................................... 245
Symbol .................................................................................................................................................................................... 245
Tags.......................................................................................................................................................................................... 245
Top............................................................................................................................................................................................ 245
URL ........................................................................................................................................................................................... 245
VisibilityVariable .................................................................................................................................................................. 245
VisibleBounds....................................................................................................................................................................... 246
Width ....................................................................................................................................................................................... 246
WrapInside............................................................................................................................................................................. 246
WrapOffset............................................................................................................................................................................. 246
Wrapped................................................................................................................................................................................. 246
ZOrderPosition..................................................................................................................................................................... 246
SymbolItem methods........................................................................................................................................................ 246
Copy......................................................................................................................................................................................... 246
Cut ............................................................................................................................................................................................ 246
Delete ...................................................................................................................................................................................... 246
Duplicate................................................................................................................................................................................ 246
Move ........................................................................................................................................................................................ 246
Resize....................................................................................................................................................................................... 246
Rotate ...................................................................................................................................................................................... 247
Transform............................................................................................................................................................................... 247
Translate................................................................................................................................................................................. 247
ZOrder..................................................................................................................................................................................... 247
SymbolItems ............................................................................................................................................................................... 249
SymbolItems properties ................................................................................................................................................... 249
Application ............................................................................................................................................................................ 249
Count....................................................................................................................................................................................... 249
Parent ...................................................................................................................................................................................... 249
SymbolItems methods ...................................................................................................................................................... 249
Add........................................................................................................................................................................................... 249
Index ........................................................................................................................................................................................ 249
Item .......................................................................................................................................................................................... 249
RemoveAll.............................................................................................................................................................................. 249
TabStopInfo................................................................................................................................................................................. 250
TabStopInfo properties..................................................................................................................................................... 250
Alignment.............................................................................................................................................................................. 250
Application ............................................................................................................................................................................ 250
DecimalCharacter ............................................................................................................................................................... 250
Leader...................................................................................................................................................................................... 250
Position ................................................................................................................................................................................... 250
Tag ............................................................................................................................
...................................................................... 251
Adobe Illustrator CS2
Visual Basic Scripting Reference 36
Tag properties ...................................................................................................................................................................... 251
Application ............................................................................................................................................................................ 251
Name ....................................................................................................................................................................................... 251
Parent ...................................................................................................................................................................................... 251
Value ........................................................................................................................................................................................ 251
Tag methods......................................................................................................................................................................... 251
Delete ...................................................................................................................................................................................... 251
Tags ................................................................................................................................................................................................ 253
Tags properties .................................................................................................................................................................... 253
Application ............................................................................................................................................................................ 253
Count....................................................................................................................................................................................... 253
Parent ...................................................................................................................................................................................... 253
Tags methods ....................................................................................................................................................................... 253
Add........................................................................................................................................................................................... 253
Index ........................................................................................................................................................................................ 253
Item .......................................................................................................................................................................................... 253
RemoveAll.............................................................................................................................................................................. 253
TextFont........................................................................................................................................................................................ 254
TextFont properties............................................................................................................................................................ 254
Application ............................................................................................................................................................................ 254
Family ...................................................................................................................................................................................... 254
Name ....................................................................................................................................................................................... 254
Parent ...................................................................................................................................................................................... 254
Style.......................................................................................................................................................................................... 254
TextFonts...................................................................................................................................................................................... 255
TextFonts properties.......................................................................................................................................................... 255
Application ............................................................................................................................................................................ 255
Count....................................................................................................................................................................................... 255
Parent ...................................................................................................................................................................................... 255
TextFonts methods ............................................................................................................................................................ 255
Index ........................................................................................................................................................................................ 255
Item .......................................................................................................................................................................................... 255
TextFrame .................................................................................................................................................................................... 256
TextFrame properties ........................................................................................................................................................ 256
Anchor..................................................................................................................................................................................... 256
Application ............................................................................................................................................................................ 256
ArtworkKnockout................................................................................................................................................................ 256
BlendingMode...................................................................................................................................................................... 256
Characters.............................................................................................................................................................................. 256
ColumnCount ....................................................................................................................................................................... 256
ColumnGutter ...................................................................................................................................................................... 256
Contents................................................................................................................................................................................. 256
ContentVariable................................................................................................................................................................... 256
ControlBounds..................................................................................................................................................................... 256
Editable................................................................................................................................................................................... 256
EndTValue.............................................................................................................................................................................. 256
FlowsLinkHorizontally....................................................................................................................................................... 256
GeometricBounds............................................................................................................................................................... 256
Height...................................................................................................................................................................................... 256
Hidden..................................................................................................................................................................................... 256
InsertionPoints................................................................................................................
..................................................... 256
Adobe Illustrator CS2
Visual Basic Scripting Reference 37
IsIsolated ................................................................................................................................................................................ 256
Kind .......................................................................................................................................................................................... 256
Layer ........................................................................................................................................................................................ 256
Left............................................................................................................................................................................................ 256
Lines......................................................................................................................................................................................... 256
Locked..................................................................................................................................................................................... 257
Matrix....................................................................................................................................................................................... 257
Name ....................................................................................................................................................................................... 257
NextFrame ............................................................................................................................................................................. 257
Opacity.................................................................................................................................................................................... 257
OpticalAlignment................................................................................................................................................................ 257
Orientation ............................................................................................................................................................................ 257
Paragraphs............................................................................................................................................................................. 257
Parent ...................................................................................................................................................................................... 257
Position ................................................................................................................................................................................... 257
PreviousFrame ..................................................................................................................................................................... 257
RowCount .............................................................................................................................................................................. 257
RowGutter.............................................................................................................................................................................. 257
Selected .................................................................................................................................................................................. 257
Sliced ....................................................................................................................................................................................... 257
Spacing ................................................................................................................................................................................... 257
StartTValue ............................................................................................................................................................................ 257
Story......................................................................................................................................................................................... 257
Tags.......................................................................................................................................................................................... 257
TextPath.................................................................................................................................................................................. 257
TextRange.............................................................................................................................................................................. 257
TextRanges ............................................................................................................................................................................ 257
TextSelection ........................................................................................................................................................................ 257
Top............................................................................................................................................................................................ 257
URL ........................................................................................................................................................................................... 257
VisibilityVariable .................................................................................................................................................................. 257
VisibleBounds....................................................................................................................................................................... 257
Width ....................................................................................................................................................................................... 258
Words ...................................................................................................................................................................................... 258
WrapInside............................................................................................................................................................................. 258
WrapOffset............................................................................................................................................................................. 258
Wrapped................................................................................................................................................................................. 258
ZOrderPosition..................................................................................................................................................................... 258
TextFrame methods........................................................................................................................................................... 258
CreateOutline ....................................................................................................................................................................... 258
Duplicate................................................................................................................................................................................ 258
Move ........................................................................................................................................................................................ 258
Remove................................................................................................................................................................................... 258
Resize....................................................................................................................................................................................... 258
Rotate ...................................................................................................................................................................................... 258
Transform............................................................................................................................................................................... 259
Translate................................................................................................................................................................................. 259
ZOrder..................................................................................................................................................................................... 259
TextFrames .................................................................................................................................................................................. 260
TextFrames properties ...................................................................................................................................................... 260
Application ....................................................................................................................
........................................................ 260
Adobe Illustrator CS2
Visual Basic Scripting Reference 38
Count....................................................................................................................................................................................... 260
Parent ...................................................................................................................................................................................... 260
TextFrames methods ......................................................................................................................................................... 260
Add........................................................................................................................................................................................... 260
AreaText ................................................................................................................................................................................. 260
Index ........................................................................................................................................................................................ 260
Item .......................................................................................................................................................................................... 260
PathText.................................................................................................................................................................................. 260
PointText ................................................................................................................................................................................ 260
RemoveAll.............................................................................................................................................................................. 260
TextPath........................................................................................................................................................................................ 262
TextPath properties............................................................................................................................................................ 262
Application ............................................................................................................................................................................ 262
Area.......................................................................................................................................................................................... 262
BlendingMode...................................................................................................................................................................... 262
Clipping .................................................................................................................................................................................. 262
Editable................................................................................................................................................................................... 262
Evenodd ................................................................................................................................................................................. 262
FillColor................................................................................................................................................................................... 262
Filled ........................................................................................................................................................................................ 262
FillOverprint .......................................................................................................................................................................... 262
Guides ..................................................................................................................................................................................... 262
Height...................................................................................................................................................................................... 262
Left............................................................................................................................................................................................ 262
Note ......................................................................................................................................................................................... 262
Opacity.................................................................................................................................................................................... 262
Parent ...................................................................................................................................................................................... 262
PathPoints.............................................................................................................................................................................. 262
Polarity .................................................................................................................................................................................... 262
Position ................................................................................................................................................................................... 262
Resolution.............................................................................................................................................................................. 262
SelectedPathPoints ............................................................................................................................................................ 262
StrokeCap............................................................................................................................................................................... 262
StrokeColor............................................................................................................................................................................ 262
Stroked.................................................................................................................................................................................... 262
StrokeDashes........................................................................................................................................................................ 263
StrokeDashOffset ................................................................................................................................................................ 263
StrokeJoin .............................................................................................................................................................................. 263
StrokeMiterLimit.................................................................................................................................................................. 263
StrokeOverprint................................................................................................................................................................... 263
StrokeWidth .......................................................................................................................................................................... 263
Top............................................................................................................................................................................................ 263
Width ....................................................................................................................................................................................... 263
TextPath methods .............................................................................................................................................................. 263
SetEntirePath........................................................................................................................................................................ 263
TextRange .................................................................................................................................................................................... 264
TextRange properties ........................................................................................................................................................ 264
Application ............................................................................................................................................................................ 264
CharacterAttributes............................................................................................................................................................ 264
CharacterOffset.................................................................................................................................................................... 264
Characters.....................................................................................................................
......................................................... 264
Adobe Illustrator CS2
Visual Basic Scripting Reference 39
CharacterStyles .................................................................................................................................................................... 264
Contents................................................................................................................................................................................. 264
InsertionPoints..................................................................................................................................................................... 264
Kerning.................................................................................................................................................................................... 264
Length..................................................................................................................................................................................... 264
Lines......................................................................................................................................................................................... 264
ParagraphAttributes .......................................................................................................................................................... 264
Paragraphs............................................................................................................................................................................. 264
ParagraphStyles................................................................................................................................................................... 264
Parent ...................................................................................................................................................................................... 264
Story......................................................................................................................................................................................... 264
TextRanges ............................................................................................................................................................................ 264
TextSelection ........................................................................................................................................................................ 264
Words ...................................................................................................................................................................................... 264
TextRange methods........................................................................................................................................................... 265
ChangeCaseTo ..................................................................................................................................................................... 265
Delete ...................................................................................................................................................................................... 265
DeSelect.................................................................................................................................................................................. 265
Duplicate................................................................................................................................................................................ 265
Move ........................................................................................................................................................................................ 265
Select ....................................................................................................................................................................................... 265
TextRanges .................................................................................................................................................................................. 267
TextRanges properties ...................................................................................................................................................... 267
Application ............................................................................................................................................................................ 267
Count....................................................................................................................................................................................... 267
Parent ...................................................................................................................................................................................... 267
TextRanges methods ......................................................................................................................................................... 267
Index ........................................................................................................................................................................................ 267
Item .......................................................................................................................................................................................... 267
RemoveAll.............................................................................................................................................................................. 267
TracingObject ............................................................................................................................................................................. 268
TracingObject properties ................................................................................................................................................. 268
AnchorCount ........................................................................................................................................................................ 268
Application ............................................................................................................................................................................ 268
AreaCount.............................................................................................................................................................................. 268
ImageResolution ................................................................................................................................................................. 268
Parent ...................................................................................................................................................................................... 268
PathCount.............................................................................................................................................................................. 268
SourceArt ............................................................................................................................................................................... 268
TracingOptions .................................................................................................................................................................... 268
UsedColorCount.................................................................................................................................................................. 268
TracingObject methods.................................................................................................................................................... 269
ExpandTracing ..................................................................................................................................................................... 269
ReleaseTracing ..................................................................................................................................................................... 269
TracingOptions........................................................................................................................................................................... 270
TracingOptions properties .............................................................................................................................................. 270
Application ............................................................................................................................................................................ 270
CornerAngle.......................................................................................................................................................................... 270
Fills............................................................................................................................................................................................ 270
LivePaintOutput .................................................................................................................................................................. 270
MaxColors ......................................................................................................................
........................................................ 270
Adobe Illustrator CS2
Visual Basic Scripting Reference 40
MaxStrokeWeight ............................................................................................................................................................... 270
MinArea .................................................................................................................................................................................. 270
MinStrokeLength ................................................................................................................................................................ 270
OutputToSwatches............................................................................................................................................................. 270
Palette ..................................................................................................................................................................................... 270
Parent ...................................................................................................................................................................................... 270
PathFitting............................................................................................................................................................................. 270
PreprocessBlur ..................................................................................................................................................................... 271
Preset....................................................................................................................................................................................... 271
Resample................................................................................................................................................................................ 271
ResampleResolution .......................................................................................................................................................... 271
Strokes..................................................................................................................................................................................... 271
Threshold ............................................................................................................................................................................... 271
TracingMode......................................................................................................................................................................... 271
ViewRaster ............................................................................................................................................................................. 271
ViewVector ............................................................................................................................................................................ 271
TracingOptions methods ................................................................................................................................................. 271
LoadFromPreset .................................................................................................................................................................. 271
StoreToPreset ....................................................................................................................................................................... 271
Variable ......................................................................................................................................................................................... 272
Variable properties ............................................................................................................................................................. 272
Application ............................................................................................................................................................................ 272
Kind .......................................................................................................................................................................................... 272
Name ....................................................................................................................................................................................... 272
PageItems .............................................................................................................................................................................. 272
Parent ...................................................................................................................................................................................... 272
Variable methods................................................................................................................................................................ 272
Delete ...................................................................................................................................................................................... 272
Variables ....................................................................................................................................................................................... 273
Variables properties ........................................................................................................................................................... 273
Application ............................................................................................................................................................................ 273
Count....................................................................................................................................................................................... 273
Parent ...................................................................................................................................................................................... 273
Variables methods .............................................................................................................................................................. 273
Add........................................................................................................................................................................................... 273
Index ........................................................................................................................................................................................ 273
Item .......................................................................................................................................................................................... 273
RemoveAll.............................................................................................................................................................................. 273
View................................................................................................................................................................................................ 274
View properties.................................................................................................................................................................... 274
Application ............................................................................................................................................................................ 274
Bounds .................................................................................................................................................................................... 274
CenterPoint ........................................................................................................................................................................... 274
Parent ...................................................................................................................................................................................... 274
ScreenMode.......................................................................................................................................................................... 274
Zoom ....................................................................................................................................................................................... 274
Views.............................................................................................................................................................................................. 275
Views properties.................................................................................................................................................................. 275
Application ............................................................................................................................................................................ 275
Count....................................................................................................................................................................................... 275
Parent .........................................................................................................................
............................................................. 275
Adobe Illustrator CS2
Visual Basic Scripting Reference 41
Views methods..................................................................................................................................................................... 275
Index ........................................................................................................................................................................................ 275
Item .......................................................................................................................................................................................... 275
Words............................................................................................................................................................................................. 276
Words properties................................................................................................................................................................. 276
Application ............................................................................................................................................................................ 276
Count....................................................................................................................................................................................... 276
Parent ...................................................................................................................................................................................... 276
Words methods ................................................................................................................................................................... 276
Add........................................................................................................................................................................................... 276
AddBefore.............................................................................................................................................................................. 276
Index ........................................................................................................................................................................................ 276
Item .......................................................................................................................................................................................... 276
RemoveAll.............................................................................................................................................................................. 276
Enumerations reference.......................................................................................................................................................... 277
AiAlternateGlyphsForm .................................................................................................................................................... 277
AiAutoKernType .................................................................................................................................................................. 277
AiAutoLeadingType ........................................................................................................................................................... 277
AiBaselineDirectionType .................................................................................................................................................. 277
AiBlendAnimationType..................................................................................................................................................... 277
AiBlendModes ...................................................................................................................................................................... 277
AiBurasagariTypeEnum .................................................................................................................................................... 277
AiCaseChangeType ............................................................................................................................................................ 277
AiColor .................................................................................................................................................................................... 277
AiColorConversion.............................................................................................................................................................. 278
AiColorDestination ............................................................................................................................................................. 278
AiColorDitherMethod........................................................................................................................................................ 278
AiColorModel........................................................................................................................................................................ 278
AiColorProfile........................................................................................................................................................................ 278
AiColorReductionMethod................................................................................................................................................ 278
AiCompatibility.................................................................................................................................................................... 278
AiCompressionQuality ...................................................................................................................................................... 279
AiCropOptions ..................................................................................................................................................................... 279
AiDocumentColorSpace ................................................................................................................................................... 279
AiDocumentType................................................................................................................................................................ 279
AiDownsampleMethod..................................................................................................................................................... 279
AiElementPlacement ......................................................................................................................................................... 279
AiEPSPostScriptLevelEnum ............................................................................................................................................. 279
AiEPSPreview........................................................................................................................................................................ 279
AiExportType ........................................................................................................................................................................ 280
AiFigureStyleType............................................................................................................................................................... 280
AiFlashExportStyle.............................................................................................................................................................. 280
AiFlashImageFormat.......................................................................................................................................................... 280
AiFlashJPEGMethod ........................................................................................................................................................... 280
AiFontBaselineOption ....................................................................................................................................................... 280
AiFontCapsOption .............................................................................................................................................................. 280
AiFontOpenTypePositionOption .................................................................................................................................. 280
AiFontSubstitutionPolicy ................................................................................................................................................. 280
AiGradientType.................................................................................................................................................................... 280
AiImageColorSpace..............................................................................................................
.............................................. 280
AiInkPrintStatus ................................................................................................................................................................... 280
Adobe Illustrator CS2
Visual Basic Scripting Reference 42
AiInkType ............................................................................................................................................................................... 280
AiJavaScriptExecutionMode ........................................................................................................................................... 280
AiJustification ....................................................................................................................................................................... 281
AiKinsokuOrderEnum ........................................................................................................................................................ 281
AiKnockoutState.................................................................................................................................................................. 281
AiLanguageType ................................................................................................................................................................. 281
AILayerOrderType............................................................................................................................................................... 281
AiMonochromeCompression ......................................................................................................................................... 281
AiOutputFlattening ............................................................................................................................................................ 282
AiPageItemType .................................................................................................................................................................. 282
AiPageMarksStyle ............................................................................................................................................................... 282
AiPathPointSelection......................................................................................................................................................... 282
AiPDFBoxType...................................................................................................................................................................... 282
AiPDFChangesAllowedEnum ......................................................................................................................................... 282
AiPDFCompatibility............................................................................................................................................................ 282
AiPDFOverprint.................................................................................................................................................................... 282
AiPDFPrintAllowedEnum ................................................................................................................................................. 282
AiPDFTrimMarkWeight ..................................................................................................................................................... 283
AiPDFXStandard.................................................................................................................................................................. 283
AiPhotoshopCompatibility.............................................................................................................................................. 283
AiPointType........................................................................................................................................................................... 283
AiPolarityValues................................................................................................................................................................... 283
AiPostScriptImageCompressionType .......................................................................................................................... 283
AiPrintArtworkDesignation ............................................................................................................................................. 283
AiPrintColorIntent............................................................................................................................................................... 283
AiPrintColorProfile.............................................................................................................................................................. 283
AiPrintColorSeparationMode ......................................................................................................................................... 283
AiPrinterColorMode ........................................................................................................................................................... 283
AiPrinterPostScriptLevelEnum ....................................................................................................................................... 283
AiPrinterTypeEnum ............................................................................................................................................................ 283
AiPrintFontDownloadMode............................................................................................................................................ 283
AiPrintingBounds................................................................................................................................................................ 283
AiPrintOrientation............................................................................................................................................................... 284
AiPrintPosition ..................................................................................................................................................................... 284
AiPrintTiling........................................................................................................................................................................... 284
AiRasterLinkState ................................................................................................................................................................ 284
AiRulerUnits .......................................................................................................................................................................... 284
AiSaveOptions...................................................................................................................................................................... 284
AiScreenMode...................................................................................................................................................................... 284
AiStrokeCap .......................................................................................................................................................................... 284
AiStrokeJoin .......................................................................................................................................................................... 284
AiStyleRunAlignmentType .............................................................................................................................................. 284
AiSVGCSSPropertyLocation............................................................................................................................................. 284
AiSVGDocumentEncoding............................................................................................................................................... 284
AiSVGDTDVersion ............................................................................................................................................................... 285
AiSVGFontSubsetting........................................................................................................................................................ 285
AiSVGFontType.................................................................................................................................................................... 285
AiTabStopAlignment ......................................................................................................................................................... 285
AiTextOrientation ............................................................................................................................................................... 285
AiTextType............................................................................................................................................................................. 285
AiTracingModeType..............................................................................................................
............................................. 285
Adobe Illustrator CS2
Visual Basic Scripting Reference 43
AiTransformation ................................................................................................................................................................ 285
AiTrappingType ................................................................................................................................................................... 285
AiUserInteractionLevel...................................................................................................................................................... 285
AiVariableKind...................................................................................................................................................................... 285
AiViewRasterType ............................................................................................................................................................... 286
AiViewVectorType .............................................................................................................................................................. 286
AiWariChuJustificationType ............................................................................................................................................ 286
AiZOrderMethod ................................................................................................................................................................. 286
1

Introduction

About this Manual

This manual provides an introduction to scripting Adobe® Illustrator® CS2 on Windows® with Visual Basic or VBScript. This document contains the following chapters:
Introduction —An introduction to scripting.
Scripting Basics — The basics of scripting with Visual Basic in Windows. If you are new to scripting, be
sure to read this chapter.
Scripting Illustrator — A brief introduction to the specifics of scripting Illustrator. Concepts and
approaches specific to the application are covered here, such as measurement units, matrices, and color models.
Visual Basic Object Reference — Details and examples are provided for every class in Illustrator’s Visual
Basic type library.
For further information and developments on this and other Adobe products, see the Adobe Solutions Network website:
http://partners.adobe.com/asn

What is Scripting?

A script is a series of commands that tells Illustrator to perform a series of actions. These actions can be simple, and affect only a single, selected object in the current document; or complex, and affect all of the objects in all of your Illustrator documents. The actions might involve only Illustrator, or they might involve other applications, such as word processors, spreadsheets, and database management programs. Many of the tasks you can perform with Illustrator’s tools, menus, palettes, and dialog boxes can be performed by a script (a notable exception is third-party plug-ins, which cannot be scripted at this time).
We naturally think of scripting as a way to automate repetitive tasks, but it can also be a creative tool. You can use scripts for creative tasks that would be too difficult or time consuming to do manually. For example, you could write a script to systematically create a series of objects, modifying the new objects’ position, stroke, and fill properties along the way. You could also write a script that accessed Illustrator’s built-in transformation matrix functions to stretch, scale and distort a series of objects. Without scripting, you’ll likely miss out on the creative potential of such labor-intensive techniques.
Scripting isn’t just for computer programmers—it’s for everybody. You don’t need a degree in computer science or mathematics to write scripts that can automate a wide variety of common tasks. If you can read this text, you can write scripts.
The language you use to write scripts depends on the operating system of the platform you’re using: AppleScript for Mac OS®; Visual Basic for Windows; JavaScript for either platform. Each of these languages is described in a separate manual.

Why use scripting?

Graphic design is a field characterized by creativity, but aspects of the actual work of illustration and page layout are anything but creative. When you think about the work that you do, chances are good you’ll find
44
Adobe Illustrator CS2
Visual Basic Scripting Reference Introduction 45
that you spend most of your time doing the same or similar production tasks, over and over again. In fact, you’ll probably notice that the time you spend placing and replacing images, correcting errors in text, and preparing files for printing at an imagesetting service provider often reduce the time you have available for doing creative work.
Wouldn’t it be great if you had an assistant—one that wouldn’t mind doing some or all of the boring, repetitive tasks for you? With that kind of help, you’d have more time to concentrate on the creative aspects of your work.
With a small investment of time, Illustrator scripting can be the assistant you need. You can start with short, simple scripts that save you a few seconds every day, and move on to scripts that work all night while you’re sleeping.
Think about your work—is there a repetitive task that’s driving you crazy? If so, you’ve identified a candidate for a script. What are the steps involved in performing the task? What are the conditions in which you need to do the task? Once you understand the process you go through to perform the task, you’ll be ready to turn it into a script.

What about actions?

Illustrator actions are different from scripts. An Illustrator action is a series of tasks you have recorded while using the application—menu choices, tool choices, object selection, and other commands. When you “play” an action, Illustrator performs all of the recorded commands.
You record, play, edit, and delete actions using Illustrator’s built-in Actions palette. The “Automating Tasks” chapter in the Adobe Illustrator User Guide covers actions in detail.
With the introduction of scripting for Illustrator, it is important to avoid any confusion about the difference between actions and scripting. Actions and scripts are both ways of automating repetitive tasks, but they work very differently. The following points summarize the key differences.
Actions use a program’s user interface to do their work. As an action runs, menu choices are executed,
objects are selected, and recorded paths are created. Scripts do not use a program’s user interface to perform tasks, and can execute faster than actions.
Actions have very limited facilities for getting and responding to information. You cannot add
conditional logic to an action. Therefore, actions cannot make decisions based on the current situation. Scripts are capable of getting information and making decisions and calculations based on the information they receive from Illustrator.
A script can execute an action, but actions cannot execute scripts.

Script Support in Adobe Illustrator CS2

The Scripts menu supports AppleScript and JavaScript scripts for Mac OS, and VBScript, JavaScript, and Visual Basic scripts for Windows.
Adobe Illustrator CS2
Visual Basic Scripting Reference Introduction 46
For a file to be recognized by Adobe Illustrator CS2 as a valid script file it must have the correct file name extension:
Script Type File Type Extension Platform
AppleScript compiled script
JavaScript ExendScript
VBScript text
Visual Basic executable

Executing scripts

The Adobe Illustrator CS2 interface includes a Scripts menu (File > Scripts) which provides quick and easy access to your scripts. Scripts can be listed directly as menu items, that run when you select them, or you can navigate to and run any script in your file system.
If Illustrator CS2 encounters an error during script execution, it displays the error message returned by the script in an error dialog.
Note: It is not possible to execute scripts that contain the
Attempting to do so causes an error.
Installing scripts
OSAS file
text
.scpt
(none)
.js .jsx
.vbs
.exe
Mac OS
Mac OS & Windows
Windows
Windows
do script command from the Scripts menu.
To install a script in the Scripts menu, place it in the Scripts folder (Illustrator CS2 > Presets > Scripts). The names of the scripts in the Scripts folder, less any file name extension, will be displayed in the Scripts menu. Any number of scripts may be installed in the Scripts menu.
Scripts added to the Scripts folder while Illustrator is running will not appear in the Scripts menu until the next time you launch Illustrator.
If you have a large collection of scripts you wish to use, you may use sub-folders in the Scripts folder to help organize the scripts in the Scripts menu. Each subfolder will be displayed as a separate submenu containing the scripts in that subfolder.
Executing other scripts
The Other Scripts item at the end of the Scripts menu (File > Scripts > Other Scripts) allows you to execute scripts which are not installed in the Scripts folder. Selecting dialog which allows you to select a script file for execution. Only files which are of one of the supported file types are displayed in the browse dialog. When you select a script file, it is executed the same way as an installed script.

System requirements for Windows and Visual Basic

Make sure the scripting plug-in is installed on your system before attempting to script Illustrator.
Other Scripts displays a file browser
Adobe Illustrator CS2
Visual Basic Scripting Reference Introduction 47
To use Illustrator scripting in Windows, you must have Windows 98®, Windows NT 4.0, Windows 2000, or Windows XP.® You will also need the Microsoft® Visual Basic development environment or one of the applications that contain a Visual Basic editor. Many applications that support the Visual Basic for Applications (VBA) language contain a built-in editor. Applications that contain a built-in editor include: Microsoft Word, Microsoft Excel, and Visio. You can use any Visual Basic editor to create your scripts.
As your scripts become more complex or require a user interface, you will find the need for a complete development environment than one of the built-in editors. The Microsoft Visual Basic development environment comes in a variety of package, all of which provide everything you need to script Illustrator.
In this manual, we use the Microsoft Visual Basic development environment’s editor.

Changes to Visual Basic and VBA support in Adobe Illustrator CS2

The following changes have been made to the Visual Basic and VBA object model in this release:
Updates to PDFSaveOptions, ExportOptionsSVG, and FlashExportOptions to reflect new
capabilities in the corresponding dialogs.
In earlier version, a script used RasterItems.Add() to place a raster file format into a document. In
this version, use
PlacedItem.Embed function, which converts it to an embedded RasterItem or other art items.
PlacedItems.Add() instead. To embed the art in the document, use the
New scripting support for underline and strikethrough font styles.
New scripting capability for converting raster art into vector art, called tracing. The tracing operation
reorders the raster art into the source art of a plugin group, and converts it into a group of filled and/or stroked paths that resemble the original image.
New methods PlacedItems.Trace and RasterItems.Trace initiate tracing, creating a new
PluginItem for the new vector art.
PluginItem.IsTracing is true for the new item, and PluginItem.Tracing contains a
reference to a new
The TracingObject.TracingOption property references a TracingOptions object that
TracingObject object.
collects the parameters used for the tracing operation. You can save tracing options to a preset file, and load previously saved tracing presets, using the
TracingOptions.LoadFromPreset and
TracingOptions.StoreToPreset methods.
2

Scripting Basics

When you use Illustrator, you work with documents and their contents. You create documents, layers, colors, and design elements. You probably think of these things as objects, that you can look at and move around, and they are in fact represented by objects in the Illustrator object model. The Illustrator object model contains documents, layers, colors, and page items—objects that can appear in an Illustrator document.
Automating Illustrator with scripting uses the same object-oriented way of thinking. Each type of object has its own special properties, and the scripting language has ways to look at and change these properties.
This chapter provides a brief introduction to the basic concepts and syntax of Visual Basic and VBA on Windows. A bibliography at the end contains references to more complete language guides.
For more information on Illustrator’s object model and specific Illustrator concepts, see Scripting
Illustrator.
For detailed information on the Visual Basic Illustrator objects and methods, see Visual Basic Object
Reference.

Object Model Concepts

In object-oriented programming, objects belong to classes and have properties that describe them. You manipulate the objects and their properties using methods in Visual Basic. (In other languages, these can be called commands or functions.) What do these terms mean in this context?
Here’s a way to think about objects and their properties. Imagine that you live in a house that responds to your commands (you can think of this house as technologically advanced, or magical, or both). The house is an object, and its properties might include the number of rooms, the color of the exterior paint, or the date of its construction.
Your house can also contain other objects. Similarly, the objects within the house can also contain smaller objects. Each room, for example, is an object in the house, while each window, door, or appliance is an object inside a room.
Each object can respond to various commands according to its capabilities. Windows and doors, for example, can open or close—but the floor and ceiling cannot. Using scripting, you can talk to each object directly, or you can talk to them as part of the container. You have to be very specific, though—you can’t tell your house to open a window without telling it which window you want to open. So windows, like all other objects, need names or at least a numbering system so you can refer to them specifically. For example, you might say “Tell the house to open the north window of the living room.”
Objects also have properties that describe specific details about them, like color and size. Imagine that the properties of objects in your house can be changed. You might say, “Door, paint yourself blue.” Because your door can respond to the command “paint,” you’ll soon have a door of a different color.
Now let’s apply this object model idea to Illustrator. The Illustrator application is the house, its documents are the rooms, and the objects in your documents are the windows and doors. You can tell Illustrator documents to add and remove objects. You can ask objects to get or change their properties.
48
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Basics 49

Object classes

Objects with the same properties and behaviors are grouped into “classes.” In the house example, windows and doors belong to their own classes, since they have unique properties, like number of panes for windows or the door style for doors. In Illustrator, every type of graphic object—paths, text, meshes, etc.—belongs to its own class, each with its own set of properties and behaviors. Properties such as
VisibleBounds, Width, and Height, for example, are common to all PageItems.

Object inheritance

Since each container can contain smaller objects, there can be hierarchy of classes: the house contains a room, which contains a door. Each bigger class is called a superclass, and each smaller one a subclass. House and room are both superclasses of door. Superclasses and subclasses are also called parent classes and child classes.
Object classes may inherit, or share, the properties of a parent, or superclass. So in our house example, windows and doors are both openings in a house, so they can be subclasses of an openings class, which contains properties that are common to all types of openings, such as open-state. In Illustrator,
PathItems, for example, inherit geometric properties like Width and Height from the PageItem class.
Classes often have additional properties that are not shared with their superclass. In our house, both a window and door inherit an open-state property from the opening class, but a window has number-of-panes property which the opening class does not. In Illustrator, the property
StrokeColor which is not inherited from the PageItem class.

Object elements or collections

Object collections, in Visual Basic, are objects contained within other objects. For example, rooms are elements (or collections) of our house, contained within the house object. In Illustrator, documents are elements of the application object, and page items are elements of a document object.

Object references

The objects in your documents are arranged in a hierarchy like the house object—page items are in layers, which are inside a document, which is inside Illustrator. When you send a message to an Illustrator object, you need to make sure you send it to the right object. To do this, you identify objects by their position in the hierarchy. You might, for example, write the following statement.
Documents(1).Layers(1).PageItems(1)
When you identify an object in this fashion, you’re creating an object reference, to give the script a way of finding the object you want to work with.
PathItems, for example, have
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Basics 50

Scripting Concepts

This section discusses various basic programming and scripting features and how they are used in the Visual Basic language.

Comments

Comments are a way to add descriptive text to a script. Comments come in handy when you want to document the operation of a script (for yourself or for someone else). The use of comments is the most important technique for good scripting. Comments are where you should leave important notes about the specific operation of a script that might provide valuable help when the script is modified at a later date. The time you save later trying to figure out what the script does may be your own. Comments are ignored by the scripting system as the script executes and cause no run-time speed penalty.
In Visual Basic, enter ' (a single straight quote) to the left of the comment.
' This is a comment

Long script lines

In some cases, individual script lines are too long to print on a single line in this guide.
Visual Basic uses the underscore character ( _ ) to show that the line continues to the next line. This continuation character denotes a “soft return” in the script. You can enter this character in the editor by pressing Shift-dash at the end of the line you wish to continue.

Value types

Values are the data your scripts use to do their work. Most of the time, the values used in your scripts will be numbers or text. The following table shows the Visual Basic value types:
Value type What it is Example:
Boolean
Long
Double
String
Array
Logical true or false
Whole numbers (no decimal points). Longs can be positive or negative.
A number which may contain a decimal point.
A series of text characters. Strings appear inside (straight) quotation marks.
A list of values. Arrays contain a single value type unless the type is defined as Variant.
true
14
13.9972
“I am a string”
Array(10.0, 20.0, 30.0, 40.0)
Object reference
User-defined
A specific reference to an object.
A collection of elements referenced by a key and stored as a key-value pair.
Application.Documents(1)
Var.name = “you” Var.index = 1
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Basics 51

Variables

Variables are containers for data. A variable might contain a number, a string, a list (or array), or an object reference. Variables have names, and you refer to a variable by its name. To put data into a variable, we assign the data to the variable. The file name of the current Illustrator document or the current date are both examples of data that can be assigned to a variable.
Why not simply enter the value directly in the script rather than using a variable? When you use a value directly the flexibility of script is reduced. By using variables the scripts you write will be reusable in a wider variety of situations. As a script executes, it can assign data to the variables that reflect the state of the current document and selection, for example, and then make decisions based on the content of the variables.
Declaring variables
In Visual Basic, it is considered good form to declare all of your variables with the Dim statement before using them. Using the clear and readable. Memory is also used more efficiently if variables are declared before use. If you start your scripts in Visual Basic with the line before assigning data to them.
Dim statement assigns a value type to the variable, which helps us keep our scripts
Option Explicit, you will be required to declare all variables
Option Explicit Dim thisNumber As Single thisNumber = 10
Assigning variable values
To assign a value that is not an object reference to a variable in Visual Basic, use Visual Basic’s assignment operator, the equal sign:
thisNumber = 10 thisString = "Hello, World!"
Variables can also be used to store references to objects. In Visual Basic, you must use the Set command to assign an object reference to a variable. For example, use
Set thisLayer = Illustrator.Documents(1).Layers.Add
This code uses Set with a reference to an existing layer:
Set thisLayer = Illustrator.Documents(1).Layers(1)
Set to assign a variable as you create a layer:
Variable naming
Try to use descriptive names for your variables—something like firstPage or corporateLogo, rather
x or c. While it will take a little more time to type the longer names, using them will make your scripts
than much easier to read. The length of a variable’s name has no effect on the execution speed of your script, so use descriptive names.
You can also give your variable names a standard prefix so that they’ll stand out from the objects, commands, and keywords of your scripting system.
Variable names must be a single word, but you can use internal capitalization (such as underscore characters ( with a number, and they can’t contain punctuation or quotation marks.
my_first_page) to create more readable names. Variable names cannot begin
myFirstPage) or
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Basics 52
Script properties
Visual Basic allows you to define properties for your scripts. Script properties are much like variables, but with additional features and requirements specific to each language. The meaning and usage of script properties differs greatly between languages; consult the bibliography for appropriate language references.

Operators

Operators perform calculations (addition, subtraction, multiplication, and division) on variables or values and return a result. For example:
docWidth/2
This returns a value equal to half of the content of the variable docWidth. So if docWidth contained the number
You can also use operators to perform comparisons (equal to, not equal to, greater than, or less than). For example:
20.5, the value returned would be 10.25.
docWidth > docHeight
This returns the value true if docWidth is greater than docHeight, or false, if it is not.
Some operators differ between languages For example, Visual Basic uses the greater and less than symbols juxtaposed,
Use the ampersand (
"Pride " & "and Prejudice."
This returns the string “Pride and Prejudice.”
<> as the non-equality symbol.
&) as the concatenation operator to join two strings.

Methods

If objects are “nouns” and properties are “adjectives” in our scripting systems, then methods are the “verbs”—they’re the parts of the script that make things happen. The type of the object you’re working with determines which methods you can use to manipulate it.
In Visual Basic, use the to Visual Basic variables or properties, and the assignment operator ( properties.
Add method to create new objects, the Set statement to assign object references

Conditional statements

If you could speak to Illustrator in the course of a work session, you might say, “If the selected object is a path, then set its stroke width to 12 points.” Conditional statements make decisions—they give your scripts a way to evaluate something (the color of the selected object, or the number of color swatches in the document, or the date) and then act according to the result. Conditional statements generally start with the word
if.
= ) to retrieve and change object
The following example checks the number of currently open documents. If no documents are open, the script displays a messages in a dialog box.
Private Sub Command1_Click()
Dim documentCount as long
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Basics 53
Dim appRef As New Illustrator.Application documentCount = appRef.Documents.Count If documentCount = 0 then
MsgBox "No Illustrator documents are open!"
End If
End Sub

Control structures

If you could talk to Illustrator, you might say, “Repeat the following procedure twenty times.” In scripting terms, this sort of direction is called a “control structure.” Control structures provide for repetitive processes, or “loops.” The idea of a loop is to repeat some action over and over again, with or without changes each time through the loop, until some condition is met.
Visual Basic has a variety of different control structures to choose from. The simplest form of a loop is one that repeats some series of script operations a set number of times.
For counter = 1 to 20
MsgBox counter
Next
A more complicated type of control structure includes conditional logic, so that it loops while or until some condition is true or false.
Do While flag = false
flag = (MsgBox ("Quit?", vbOKCancel)) = vbCancel
loop
Do Until flag = true
flag = (MsgBox ("Quit?", vbOKCancel)) = vbOK
loop

Subroutines

In Visual Basic, subroutines are scripting modules you can refer to from within your script. These are sometimes called routines or handlers. Subroutines are ways to re-use parts of scripts. Typically, you send one or more values to a subroutine, and it returns one or more values. A subroutine might, for example, perform conversions from one measurement system to another, or calculate the geometric center point of an object from its geometric bounds.
There’s nothing special about the code used in subroutines—they are simply conveniences that save you from having to type the same lines of code over and over again in your script. If you find yourself typing or pasting the same lines of code into several different places in a script, you’ve identified a good candidate for a subroutine.
This example calculates the geometric center of a selected art item. It assumes you have a single art item selected.
Private Sub Command1_Click() Dim appRef As New Illustrator.Application
Dim selectedObjects As Variant Dim objectBounds As Variant Dim objectCenter As Variant
If appRef.Documents.Count > 0 Then
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Basics 54
selectedObjects = appRef.Documents(1).Selection
If TypeName(selectedObjects) = "Variant()" Then
objectBounds = selectedObjects(0).GeometricBounds objectCenter = GetItemCenter(objectBounds) MsgBox ("Center x:" & objectCenter(0) & ", y:" & objectCenter(1))
End If End If End Sub
The following lines define the function:
Function GetItemCenter(sourceBounds As Variant) As Variant
Dim left As Single Dim top As Single Dim right As Single Dim bottom As Single Dim xCenter As Single Dim yCenter As Single
left = sourceBounds(0) top = sourceBounds(1) right = sourceBounds(2) bottom = sourceBounds(3) xCenter = (left + right) / 2 yCenter = (top + bottom) / 2
GetItemCenter = Array(xCenter, yCenter)
End Function

Testing and Troubleshooting

The scripting environment provides tools for monitoring the progress of your script while it is running— which make it easier for you to track down any problems your script might be encountering or causing.
In Visual Basic, you can stop your script at any point, or step through your script one line at a time. To stop your script at a particular line, select that line in your script and choose Debug > Toggle Breakpoint. When you run the script, Visual Basic will stop at the breakpoint you have set. Choose Debug > Step Into (or press F8) to execute the next line of your script, or choose Run > Start (or press F5) to continue normal execution of the script. You can also observe the values of variables defined in your script using the Watch window—a very valuable tool for debugging your scripts. To view a variable in the Watch window, select the variable and choose Debug > Quick Watch. Visual Basic displays the Quick Watch dialog box. Click Add. Visual Basic displays the Watch window.
If you have closed the Watch window, you can display it again by choosing View > Watch Window.

About error handling

Imagine that you’ve written a script that formats the current text selection. What should the script do if the current selection turns out not to be text at all, but a path item? You can add error handling code to your script to respond to conditions other than those you expect it to encounter.
If you have complete control over the situations in which your script will run, there’s no need for you to worry about error handling. If not, however, you’ll have to add some error handling capabilities to your script.
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Basics 55
The following example shows how to how you can stop a script from executing when a specific file cannot be found. This example stores a reference to the fifth path item of a document in a variable. If such an object does not exist in the current document, it displays a message.
Private Sub Command1_Click()
Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document Dim aiObject As Illustrator.PathItem Dim numObjects As Single Dim errorMessage As String
Set docRef = appRef.ActiveDocument numObjects = docRef.PathItems.Count On Error GoTo DisplayError Set aiObject = docRef.PathItems(5)
Exit Sub
DisplayError:
errorMessage = "Couldn't locate 5th path object - Only " errorMessage = errorMessage & numObjects & " objects." MsgBox errorMessage
End Sub

Visual Basic Resources

For further information and instruction in using Visual Basic and the VBA scripting language, see these documents and resources:
“Learn to Program with Visual Basic 6,” 1st ed., John Smiley, Active Path, 1998. ISBN 1-902-74500-0.
“Microsoft Visual Basic 6.0 Professional,” 1st ed., Michael Halvorson, Microsoft Press, 1998. ISBN
1-572-31809-0.
“VB & VBA in a Nutshell,” 1st ed., Paul Lomax, O’Reilly, 1998. ISBN 1-56592-358-8.
Microsoft Developers Network (MSDN) scripting website:
msdn.microsoft.com/scripting
3

Scripting Illustrator

This chapter discusses the object model and application-specific concepts that you use to script Adobe Illustrator using Visual Basic and VBScript.

The Illustrator Object Model

A good understanding of the Illustrator object model will improve your scripting abilities. The following figure shows the containment hierarchy of the object model, starting with the application object.
Application
Document
Text Font
Paragraph Style
Character Style
Gradient
Dataset
Variable
Swatch
Layer
Group Item
Graphic Style
Spot
View
Symbol
Pattern
Story
Page Item
Compound
Path Item
Graph Item
Mesh ItemBrush
Path Item
Placed Item
Plugin Item
Raster Item
Symbol Item
Text Frame
Path Item
Path Point
Adobe Illustrator Scripting Object Model
Note that the Layer, GroupItem, and all text classes can contain additional objects of the same class which can in turn contain additional nested objects. For the text object model, see Working with text art
56
.
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Illustrator 57

Looking at Illustrator objects and commands

While the objects and commands available in Illustrator are all documented in this guide, you can also view them from inside your scripting system.
To view the Illustrator type library:
1. In any Visual Basic project, choose Project > References. Visual Basic displays the References dialog box. If you are using a built-in editor in a VBA application, choose Tools > References.
2. Turn on the “Adobe Illustrator CS2 Type Library” option from the list of available references and click OK. If the library does not appear in the list of available references, reinstall Illustrator with your scripting plug-ins.
3. Choose View > Object Browser. Visual Basic displays the Object Browser window.
4. Choose “Illustrator” from the list of open libraries shown in the top-left pull-down menu. Visual Basic displays the classes and the members of those classes in the Object Browser window.
5. Click an object class or class member. Visual Basic displays more information about the object in the frame at the bottom of the Object Browser window.

Your First Illustrator Script

The traditional first project in any programming language is to display the message “Hello World!” In this example, we’ll create a new Illustrator document, then add a text frame item containing this message.
To create a Visual Basic script follow these steps:
1. Start Visual Basic and create a new project. Add the “Adobe Illustrator CS2 Type Library” reference to the project, as shown earlier. If you are using a built-in editor in a VBA application, skip to step 4.
2. Add a form to the project.
3. Create a new button on the form. Double-click the button to open the Code window.
4. Enter the following code. The lines which begin with a single quote character (‘) are comments, and will be ignored by the scripting system. They’re included to describe the operation of the script. As you look through the script, you’ll see how we create, then address each object in turn.
Private Sub Command1_Click()
Dim appRef As New Illustrator.Application Dim documentRef As Illustrator.Document Dim sampleText As Illustrator.TextFrame
'Create a new document and assign it to a variable
Set documentRef = appRef.Documents.Add
'Create a new text frame item and assign it to a variable
Set sampleText = documentRef.TextFrames.Add
'Set the contents and position of the TextFrame
sampleText.Position = Array(200, 200) sampleText.Contents = "Hello World!"
End Sub
5. Save the form.
6. Start Illustrator.
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Illustrator 58
7. Return to Visual Basic and run the program. If you created a form, click the button you created earlier.
8. Run the script.
Illustrator creates a new document, adds a text frame item at the specified position, and sets the text to “Hello World!”.

VBScript

You don’t need to use Visual Basic to run scripts on Windows. Another way to script Illustrator is to use a VBA editor (such as the one that is included in Microsoft Word) or to use Windows Scripting Host.
Windows Scripting Host is part of Windows2000. If you don’t have Windows2000, you can download Windows Scripting Host from: http://msdn.microsoft.com/scripting/
Both VBA and Windows Scripting Host use VBScript as their scripting language. The syntax for VBScript is very similar to the Visual Basic syntax. The three main differences relating to the scripts shown in this guide are:
VBScript is not as strongly typed as Visual Basic.
In Visual Basic you say:
Dim aRef as Illustrator.PathItem
For VBScript simply omit the “as X” part:
Dim aRef
VBScript does not support the as New Illustrator.Application form.
In Visual Basic you retrieve the Application object as:
Dim appRef as New Illustrator.Application
In VBScript you write the following to retrieve the Application object:
Dim appRef Set appRef = CreateObject("Illustrator.Application.3")
VBScript does not support enumerations; you must use integer values instead. (See the Enumerations
reference section in Visual Basic Object Reference to find the values that correspond to the various
enumerations.) Here’s an example of how to close the frontmost document without saving.
In Visual Basic:
Dim appRef As New Illustrator.Application appRef.ActiveDocument.Close (aiDoNotSaveChanges)
In VBScript:
Dim appRef Set appRef = CreateObject("Illustrator.Application.3") appRef.ActiveDocument.Close ( 2 )
Here is an example of Hello World! for VBScript:
Dim appRef Dim documentRef Dim SampleText
'Create a new document and assign it to a variable Set appRef = CreateObject("Illustrator.Application.3") Set documentRef = appRef.Documents.Add
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Illustrator 59
'Create a new text frame item and assign it to a variable Set SampleText = documentRef.TextFrames.Add
'Set the contents and position of the TextFrame item SampleText.Position = Array(200, 200) SampleText.Contents = "Hello World!"
To run this script create a text file and copy the script into it. Save the file with a .vbs extension. If you have Windows Scripting Host installed, you can double-click on the file to execute the script.
Another way to execute the script is to choose File > Scripts > Browse from the and select the file.

Adding features to “Hello World”

Next, let’s create a new script that makes changes to the Illustrator document you created with your first script. Don’t worry if you’ve closed the Illustrator document without saving it—just run your script to create a new one.
Our second script will demonstrate how to:
Get the active document.
Get the width of the active document.
Resize the text frame item to match the document’s width.
To create the enhanced script follow these steps:
1. Open the project you created for the “Hello World” script, if it’s not already open.
2. Add a new button to the form.
3. Double-click the button to display the Code window, then enter the following code.
Private Sub Command1_Click()
Dim appRef As New Illustrator.Application Dim documentRef As Illustrator.Document Dim sampleText As Illustrator.TextFrame Dim documentWidth As Single
Scripts menu in Illustrator
' Get the active document Set documentRef = appRef.ActiveDocument documentWidth = documentRef.Width Set sampleText = documentRef.TextFrames(1) ' Resize the TextFrame item to match the document width sampleText.Width = documentWidth sampleText.Left = 0
End Sub
4. Save the form.
5. Open the original document you created using the “Hello World” script, then return to Visual Basic and run the script.
6. Click the button you created in Step 2.
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Illustrator 60

Object References

In Visual Basic, you must use the Set command to assign an object reference to a variable, rather than the simple assignment operator ( existing layer reference to variables:
Set thisLayer = Illustrator.Documents(1).Layers.Add() Set thisLayer = Illustrator.Documents(1).Layers(1)
For some types of objects, the Name property is writable. The collections are sorted alphabetically by name, so if a script modifies the name of such an object, references to that object by the old name or index can become invalid. These object types include the following:
Brush Gradient GraphicStyle Pattern Swatch Symbol Variable
Object references in Visual Basic are dynamic and remain valid until disposed. For example, the following creates a star and rectangle and uses object references to select them:
=). For example, the following lines use Set to assign a newly created and an
Private Sub Command1_Click()
'Make 2 new objects and select both Dim appRef As New Illustrator.Application Dim pathItemsRef As Illustrator.PathItems Dim rectPath As Illustrator.PathItem Dim starPath As Illustrator.PathItem Set pathItemsRef = appRef.ActiveDocument.ActiveLayer.PathItems Set rectPath = pathItemsRef.Rectangle(50, 70, 100, 200) Set starPath = pathItemsRef.Star(40, 70, 200, 110, 5, False)
Dim pathSelection(1) As Variant Set pathSelection(0) = rectPath Set pathSelection(1) = starPath appRef.Selection = pathSelection
End Sub

Creating objects in Visual Basic

As the object model diagram shows, objects are arranged in a hierarchy. To obtain a reference to a specific object you need to navigate the hierarchy. For example, to store a reference to the first second layer of the active document in the variable
Set myPath = appRef.ActiveDocument.layers(2).PathItems(1)
Since most objects in the hierarchy are referenced through the Application object, you must have a reference to the Illustrator application before you can start modifying any other objects. There are several ways to obtain a reference to an Illustrator application object.
PathItem in the
myPath you would write:
Use the New command if you have added a reference to the Illustrator type library to the project. For
example, the following line creates a new reference to the
Dim appRef As New Illustrator.Application
Application object:
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Illustrator 61
GetObject also creates a reference to a running instance of Illustrator. If Illustrator is not running an
error is returned.
Dim appRef As Illustrator.Application Set appRef = GetObject(, "Illustrator.Application")
CreateObject launches Illustrator as an invisible application if it is not already running. Note that if
Illustrator was launched as an invisible application you have to manually activate the application to make it visible.
Dim appRef As Illustrator.Application Set appRef = CreateObject("Illustrator.Application")
Note: If you have both earlier and later versions of Illustrator installed on the same machine and use the
CreateObject() or GetObject() method to obtain an application reference, use the optional
numeric version identifier at the end of the string “
Illustrator.Application” —when the
version identifier is not present, the string refers to the latest installed Illustrator version. To specifically target a version:
For Illustrator 10, use "Illustrator.Application.1"
For Illustrator CS, use "Illustrator.Application.2"
For Illustrator CS2, use "Illustrator.Application.3"

Objects that must be created

There are a number of objects in addition to Application that cannot be obtained by using the hierarchy shown in the object model diagram. These objects must created directly using the techniques shown above for the
ExportOptionsFlash Ink InkInfo NoColor OpenOptions PaperInfo PPDFile PPDFileInfo
The following example demonstrates how to create new objects such as EPSSaveOptions.
' Create a reference to the Illustrator Application Dim appRef As New Illustrator.Application ' Create an EPS-save option object Dim myEPSSaveOptions As New Illustrator.EPSSaveOptions ' Set the options according to how you want the save to occur myEPSSaveOptions.EmbedAllFonts = True myEPSSaveOptions.Compatibility = aiIllustrator8 myEPSSaveOptions.Preview = aiColorTIFF ' Save the active document appRef.ActiveDocument.SaveAs "C:\Temp\AI_TestDocument.eps", myEPSSaveOptions
Application object. Those objects include:
PrintColorManagementOptions PrintColorSeparationOptions PrintCoordinateOptions Printer PrinterInfo PrintFlattenerOptions PrintFontOptions PrintJobOptions
PrintOptions PrintPageMarksOptions PrintPaperOptions PrintPostScriptOptions Screen ScreenSpotFunction

Objects that cannot be created by a script

Following are some objects that cannot be created from a script:
Graphic styles
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Illustrator 62
Brushes
Graphs
Mesh art
Plugin art
Spirals

Object containment: document vs. layer

In Illustrator, all artwork objects are contained in layers, groups, or compound paths that are themselves contained in a document. The index of an object in a layer or group indicates the object’s position in the stacking order of the layer or group. This means that in a document, while
Layers(1).PageItems(2)lies directly behind in the stacking order.
Note that if you delete all the layers in a document, the document is left with the default empty layer called
Layer 1.
When you refer to an object in your document, you can reference it directly as part of the document or by its complete containment hierarchy, including layers and any group or compound path if valid. When you refer to objects contained by the document directly, you can access the entire flattened contents of the document, without regard to the containment of objects within layers, groups, or compound paths. All objects, whether or not they are contained in groups or compound paths, are returned as individual objects contained by the document. The following script demonstrates how to reference an object as part of a document.
Layers(1).PageItems(1) is the frontmost object
Private Sub Command1_Click()
'Get reference for first page item of document 1 Dim appRef As New Illustrator.Application Dim documentRef As Illustrator.Document Dim pageItemRef As Object
Set documentRef = appRef.ActiveDocument Set pageItemRef = documentRef.PageItems(1)
End Sub
In the script below, the variable pageItemRef will not necessarily refer to the same object as the above script since this script includes a reference to a layer:
Private Sub Command1_Click()
'Get reference for first page item of document 1 Dim appRef As New Illustrator.Application Dim documentRef As Illustrator.Document Dim pageItemRef As Object
Set documentRef = appRef.ActiveDocument Set pageItemRef = documentRef.Layers(1).PageItems(1)
End Sub

Syntax Differences Between Sub and Function Methods

Visual Basic supports different types of methods. When scripting Illustrator, your scripts will call both Sub and Function methods. The difference between the two methods is that a Function returns a value while a
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Illustrator 63
Sub, or method call, does not. For example, the Add method is a function because it returns a reference to the newly added object.
When calling a Function, Visual Basic expects you to put parentheses around the function’s arguments. With a Sub, however, Visual Basic disallows the use of parentheses around the arguments unless you use an alternative syntax. The following lines demonstrate the difference between the syntax for calling a Function,
Add, and a Sub, ApplyTo, in Visual Basic.
Set newDoc = appRef.Open("C:\myfile.eps") appRef.ActiveDocument.GraphicStyles(2).ApplyTo artItem

Working with Document Contents

The following sections provide details of how to work with various kinds of document contents:
“Working with selections”
“Working with paths”
“Working with color”
“Working with symbols and symbol items”
“Working with text art”

Working with selections

There are instances where you will want to write scripts that act upon the currently selected object or objects. For example, you might want to have a script that applies formatting to selected text, or changes a selected path’s shape. To do this, you need to know the number of selected objects and the type of each object.
The following script works with the current selection.
'Selection sorter Private Sub Command1_Click() Dim appRef As New Illustrator.Application Dim documentRef As Illustrator.Document Set documentRef = appRef.ActiveDocument selectedObjects = documentRef.Selection If TypeName(selectedObjects) = "String" Then
'text is selected Else 'Is anything selected?
If IsEmpty(selectedObjects) Then GoTo noSelection
For Each artObject In selectedObjects
selectedObjectClass = TypeName(artObject) Select Case selectedObjectClass
'Something is selected, let’s find out what it is.
Case "PathItem"
'Object is a path item
Case "CompoundPathItem"
'Object is a compound path
Case "RasterItem"
'Object is a raster image
Case "PlacedItem"
'Object is a placed image
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Illustrator 64
Case "MeshItem"
'Object is a mesh
Case "TextFrame"
'Object is a text frame
Case "PluginItem"
'Object is a plugin art item
Case "PathPoint"
'Object is a point of a path
Case "GroupItem"
'Object is a group of objects
End Select
Next
End If Exit Sub
noSelection:
MsgBox "Select an object and try again." End Sub

Working with paths

Path items include all artwork that contain paths, including rectangles, ellipses, polygons, as well as freeform paths. In Illustrator, every path consists of a series of points; see the following figure.
PathPoint
RightDirection
PathItem
Anchor
LeftDirection
Path items, as well as path points, can be created and manipulated from a script. Every aspect of a path point can be accessed from scripting, including the
LeftDirection and RightDirection properties.
AnchorPoint and both control points, known as the
For more information on working with paths, Bézier curves, and path points, refer to the Illustrator Plug-in Software Development Kit Function Reference. This document is available as part of the Illustrator Software
Development Kit (SDK), which can be downloaded from the Adobe Solutions Network (ASN) web site:
http://partners.adobe.com/asn/developer/sdks.html

Working with color

Swatches can be created and manipulated from your scripts. You can also create new patterns, gradients, and spot colors from scripts. Just as in the user interface, percentages (0.0 through 100.0) are used to specify grayscale, individual CMYK values and spot tints. The range 0.0 to 255.0 is used for the individual RGB color values. Special attention should be paid to working with CMYK and RGB color values. Illustrator CS2 supports only a single color model within each document, either CMYK or RGB. When you specify a CMYK color value in a document that uses the RGB color model, Illustrator will convert the values to RGB and return an RGB color, and vice-versa when specifying RGB colors in a CMYK document.
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Illustrator 65
However, there is some data loss during this conversion. Refer to the “Applying Color” chapter in the Adobe Illustrator User Guide for more information on working with color.

Working with symbols and symbol items

Symbols are art items that are stored in the Symbols palette and applied to documents. You can create, delete and duplicate symbols. When you create symbols, Illustrator adds them to the Symbols Palette for the target document. When you save the document, Illustrator also saves the symbols you created and used in the document.
Symbol items refer to instances of symbols in a document. You can create, delete, and duplicate symbol items. They are “linked” to the symbol definition such that changing the definition of a symbol causes all of the instances of the symbol to change as well. Symbol items are Illustrator art items and therefore can be treated as other art items or page items. In other words, you can rotate, resize, select, lock, hide, and perform other operations on them.

Working with text art

In Illustrator CS2, the object model for text changed significantly. The following figure shows the CS2 object model for text.
Character Style
Paragraph Style
Application
Document
Story
Text Frame
Text Range
Selection
Paragraph
Line
Word
Character
Illustrator Object Model for Text
With the new text model, the text in an Illustrator document is contained inside a story. A document can have multiple stories, and each story has a text range. A story can contain one or more text frames. In this case, multiple text frames are linked together to form a single story. There are special sets of text ranges within a text range that have semantic meanings such as paragraphs, lines, words, characters.
There are three types of text frame items in Adobe Illustrator: point text, path text, and area text. The property of a text frame item is used to determine the type of the text frame item. While all three kinds of text art have some common characteristics, such as an orientation, each kind of text art also has unique characteristics.
o
f
e
l
t
e
x
t
o
n
a
p
a
t
h
This is an example of point text.
This is
an exam-
ple of area
text.
p
m
a
x
e
n
a
s
i
s
i
h
T
Kind
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Illustrator 66
All three kinds of text frames have least one text path associated with them. A TextPath is not the same as a path art item, but defines the text frame’s position on the artboard and its orientation (horizontal or vertical). Point text is defined completely by the properties of its text frame and associated text path.
For path and area text, text paths are associated with normal path art items. These path art items can be accessed and manipulated to modify the appearance of the associated text frame. If the text frame is path text, it will have a
TextPathOffset property, which indicates where on the path object the text begins.
All text art items also have at least one line of text depending on the object’s geometry. A of the characters that fit on a single line in the text frame item. Text art will have multiple text lines if it contains hard line breaks or its characters flow to a new line because they do not fit in the width of the text art. Unlike characters, paragraphs and words, lines can only be created by the Illustrator application.
Refer to the “Using Type” chapter in the Adobe Illustrator User Guide for more information on working with text art.
TextLine is all
Content of a text range
You can set the content of a text range by passing in a Unicode string known to that particular scripting language. If you know the Unicode value of a character, you can enter it using a C language style backslash escape sequence. If the string starts with a single or double quote, treat the quote as a delimiter. The exact escape characters it recognizes depends on the scripting language being used.
Character style, character attributes, local character attributes
You can change the display properties of a text range by applying an appropriate character style and/or providing local overrides of character attributes at the text and/or paragraph levels.
The character styles are hierarchical, namely you can derive a new character style from another base (parent) character style, although only one level of inheritance is allowed. The root character style is named ‘Normal’, with all character attributes defined and set to default values.
If you query for the character attributes of a text range, Illustrator will derive a fully defined/flattened set of character attributes (because at the root level, ‘Normal’ character style is always fully defined).
This principle also applies the paragraph style, paragraph attributes and local paragraph attributes.

Measurement Units

Illustrator uses points as the unit of measurement for almost all distances, where one inch is equal to 72 points. The one exception is that for values for properties such as kerning, tracking, and the aki properties (used for Japanese text composition), em units are used; see Em Space Units
Even if you change the current document ruler’s units of measurement, Illustrator will still use points when communicating with your scripts. Your scripts will need to perform any unit conversions needed to represent your measurements as points. For example, to move the current selection to a position 2 inches to the right of, and 6 inches above, its current position, you’d use the following script for Visual Basic:
Private Sub Command1_Click()
Dim appRef As New Illustrator.Application
Dim documentRef As Illustrator.Document
Dim selectedObjects As Variant
Dim objectRef As Variant
.
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Illustrator 67
Set documentRef = appRef.ActiveDocument
selectedObjects = documentRef.Selection
If TypeName(selectedObjects) = "Variant()" Then
For Each objectRef In selectedObjects
'There are 72 points per inch, so this moves 'the object 2" to the right and 6" up
objectRef.Translate 144, 226
Next
End If End Sub
If your script depends on adding, subtracting, multiplying, or dividing specific measurement values for units other than points, the script will need to convert between the units numerically. For example, to use English measurements such as inch values for coordinates or measurement units, your script will need to multiply all inch values by 72 to convert to points, since there are 72 points in an inch. To use metric measurements such as centimeters, you will need to multiply all centimeter values by 28.346, since there are 28.346 points in a centimeter.

Unit conversion to points

This table shows the conversion formulae for various units of measurement:
Unit Conversion formula
centimeters 28.346 points = 1 centimeter
inches 72 points = 1 inch
millimeters 2.834645 points = 1 millimeter
picas 12 points = 1 pica
Qs 0.709 point = 1 Q (1 Q equals 0.23 millimeter)

Em Space Units

One exception to the rule of points being used for all measurements is the use of em units (a traditional typesetting measure) for a few properties such as for kerning and tracking. Values for these properties are measured in thousandths of an em space.
Em units are proportional to the current font size. For example, in a 6-point font, 1 em equals 6 points; in a 10-point font, 1 em equals 10 points. Similarly, a kerning value of 20 em units for a 10-point font would be equivalent to:
(20 units x 10 points) / 1000 units/em = 0.2 points

Coordinates

Illustrator uses simple two-dimensional geometry to record the position of objects in a document. The coordinates used in Illustrator are the same as the “traditional” geometric coordinate system you learned about in school. The horizontal component of a coordinate pair (or “point”) is referred to as “x” and the vertical position is denoted by “y”. You can see these coordinates in the Info palette when you select or create an object in Illustrator.
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Illustrator 68
Illustrator scripting uses a special class called fixed point to receive and return coordinate data. The fixed point is represented as a variant array of two elements in Visual Basic. The first item is the horizontal or “x” coordinate, while the second item is the vertical or “y” coordinate. The document are described with a fixed point.
Position of objects on a

Fixed points

In Visual Basic, a fixed point with an x coordinate of 5.0 and a y coordinate of 10.2 is represented as a variant array that looks like this:
Array (5.0, 10.2)
Note that if you declare an array to hold the values of a point, you should pass 1 as the dimension, since Visual Basic uses index position 0 for the first item in an array.
Dim aPoint(1) As Single aPoint(0) = 5.0 aPoint(1) = 10.2

Zero point

The zero point (0, 0) for coordinate numbering in Illustrator is in the lower left corner of the document. On the horizontal axis, coordinates to the right of the ruler’s zero point are positive numbers, and on the vertical axis, coordinates above the zero point are positive. The lower left corner of the printable region of the document as a fixed point.

Fixed rectangle

To work with rectangular coordinates where there are a pair of x and y values, Illustrator uses the special class called a The coordinates of a fixed rectangle in order are: left, top, right, bottom.
In Visual Basic, a fixed rectangle with a left-top corner of (5.0, 200.0) and a right-bottom corner of (100.0,
20.0) is represented by a variant array that looks like this:
Array (5.0, 200.0, 100.0, 20.0)
Alternatively, you can define your array and assign values to its elements like this:
Dim boundsRect(3) As Single boundsRect(0) = 5.0 boundsRect(1) = 20.0 boundsRect(2) = 100.0 boundsRect(3) = 200.0
PageOrigin of a document defines the
FixedRectangle. This class consists of a variant array with four elements in Visual Basic.

Page item positioning and dimensions

Every object, or page item, in a document has a position described by a fixed point and a width and height. The maximum value allowed for the width or height of a page item is 16348 points.
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Illustrator 69
Position
ControlBounds
VisibleBounds
GeometricBounds
PageOrigin
(0,0)
Detail
Every page item also has three properties that describe the object’s overall extent using fixed rectangles. The
GeometricBounds of a page item are the rectangular dimensions of the object excluding stroke
width. The Finally, the
VisibleBounds of a page item are the dimensions of the object including any stroke widths. ControlBounds define the rectangular dimensions of the object including in- and out-
control points.

Printing Illustrator Documents

Prior to Illustrator CS, scripts could use the print command, but they could not control any of the print settings. With the new printing model, you can use the full range of Illustrator print capabilities from a script. In many instances, the print features available via scripting are greater than those available through the Illustrator CS2 print user interface.
Using the print scripting feature, scripters can capture and automate parts of their print workflow, which allows them to focus on other more creative work. Scripting exposes the full capabilities of Illustrator printing, some of which may not be accessible through the normal print user interface.
Illustrator supports at most one print session at any give time because of limitations in the current printing architecture.
When printing, you may provide an options parameter to more fully control the printing process. Illustrator CS2 supports an extensive list of new printing options, all of which have default values. As a scripter, you can override any one of these printing options. If you do not override those printing options or if you override those printing options with illegal values (such as specifying a printer or paper that does not exist), an error is returned.
The following lists the categories of printing options that you can specify. Each one of these categories is optional. Within each category, default values have been provided for all properties.
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Illustrator 70
Print Option Description
Printer name Name of the selected printer
PPD file name File name of the selected PPD file
Print style name Specifies the printing style
Paper options Specifies the paper name and custom paper sizes
Print job options Options which control things such as number of print copies
Color separation options Specifies the separation mode, ink list, etc.
Page marks options Controls the printing of page marks
Coordinate options Specifies the positioning and scaling of artwork on the media
Font options Controls the fonts used for printing
PostScript® options Controls parameters such as the PostScript LanguageLevel
Color management Sets color profiles
Flattener options Controls the transparency flattening
The print settings are determined through the following precedence order:
The print style settings, if any are specified, override the default print settings.
The specific printing options, if any are specified, override the print style settings.

Transformation Matrices

Thanks to the matrix class and the many commands that support matrices, you have access to the power of geometric transformation matrices. Transformation matrices are mathematical concepts originating in the field of linear algebra. Geometric manipulations like scaling, rotating, and moving can all be described using transformation matrices.
Matrices are the basis of how Illustrator internally performs a user’s request to scale, rotate, or move an object. Using the command set available to create, concatenate, and apply matrices, you can transform objects in documents with programmatic precision and control. By concatenating a series of rotation, translation and scaling matrices together and applying the resulting matrix, you can perform a large series of geometric transformations in record speed. The following examples demonstrate how to combine multiple modifications in a single matrix and then apply the matrix to every object in a document.
Refer to the Illustrator Plug-in Software Development Kit Function Reference for more information on working with transformation matrices.
This example shows how to apply 2 transformations to all art in a document using the matrix command. This is more efficient than performing these transformations one at a time.
Private Sub ApplyMatrix_Click()
Dim appRef As New Illustrator.Application
Dim moveMatrix As Illustrator.Matrix
Dim totalMatrix As Illustrator.Matrix
'Move art half an inch to the right and 1.5 inch up on the page
Set moveMatrix = appRef.GetTranslationMatrix(72# * 0.5, 72# * 1.5)
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Illustrator 71
'Add a rotation to the translation
'to rotate 10 degrees counter clockwise
Set totalMatrix = appRef.ConcatenateRotationMatrix(moveMatrix,10)
'Apply the transformation to all art in the document Dim frontDocument As Illustrator.Document Dim artItem As Illustrator.PageItem
Set frontDocument = appRef.ActiveDocument For Each artItem In frontDocument.PageItems
artItem.Transform totalMatrix Next
End Sub
A matrix object in Illustrator consists of six properties. In Visual Basic, these properties are:
MValueA MValueB MValueC MValueD MValueTX MValueTY
By experimenting with the matrix concatenation commands, 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 document-level objects; therefore, you create them in the document object. You can add and delete variables to/from a script by using the
Datasets are closely related to variables in that a dataset collects variables and their associated dynamic data into a single object. The
DataSet collection in the Document class provides methods so you can create, update and delete
datasets.
Variable class corresponds to these variables. Variables are
Add and Remove/ RemoveAll methods.
DataSet class is the object that corresponds to an AI DataSet. The

Launching and Quitting Illustrator from a Script

Your scripts can control the activation and quitting of the Illustrator application. In Visual Basic, the
Activate method brings the Illustrator application to the front if it is not already frontmost. The Quit
method quits the application.
Note that if the clipboard contains data at the time of quitting, Illustrator may show a dialog prompting the user to save the data on the clipboard for other applications. You can avoid this dialog by first clearing the clipboard with the command:
Clipboard.Clear
Adobe Illustrator CS2
Visual Basic Scripting Reference Scripting Illustrator 72

User Interaction Levels

An application will usually present a dialog when it needs to provide feedback or request information. This is called user interaction, and is useful and expected when you are directly interacting with the application. On the other hand, when a script is interacting with an application, an unexpected dialog will bring the execution of the script to a halt until the dialog is dismissed. This can be a serious problem in an automation environment where there is typically no one present to deal with dialogs.
The Illustrator CS2 application class contains a user interaction level property. By setting this property a script can control the level of interaction allowed during script execution. All interaction is normally suppressed in an automation environment, and some interaction might be useful where scripts are being used in a more interactive fashion.
There are two possible values for the
Property Value Result
aiDontDisplayAlerts
aiDisplayAlerts
UserInteractionLevel property in Visual Basic:
No interaction is allowed
Interaction is allowed
4

Visual Basic Object Reference

This reference section describes the objects and methods in the Illustrator Visual Basic type library. All of the classes in the type library are presented alphabetically. The chapter concludes with an enumerations reference which lists all of the enumerations in the Illustrator type library.
Each class listing includes the following:
Properties of the class, including value type, read-only status, and an explanation.
Methods for the class. Value types needed by the method are shown in bold face. Enumerated values
are linked to the Enumerations reference by brackets [ ] are optional.
Script examples.
These example are intended to illustrate concepts, and do not necessarily represent the best or most efficient way to construct a Visual Basic script. They contain little error checking, and assume that the proper context exists for the scripts to execute in (for instance, that there is a document open or items selected).
Each script contains a single subroutine that can be pasted into any event in a Visual Basic form if you are using the Visual Basic development environment. A standard button click event is used for all examples. If you are using a built-in Visual Basic editor in a VBA application, you can paste the script into a macro routine. In either case, modify the situation.
. Required terms are shown in plain face. All items surrounded
Sub statement in the example to work with your
See The Illustrator Object Model
for an overview of how the Illustrator object model is structured.
73
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 74

Application

The Adobe Illustrator application object, which contains all other Illustrator objects.
Note: If you have both earlier and later versions of Illustrator installed on the same machine and use the
CreateObject() or GetObject() method to obtain an application reference, use the optional
numeric version identifier at the end of the string “ version identifier is not present, the string refers to the latest installed Illustrator version. To specifically target a version:
For Illustrator 10, use "Illustrator.Application.1"
For Illustrator CS, use "Illustrator.Application.2"
For Illustrator CS2, use "Illustrator.Application.3"

Application properties

Property Value type What it is
Illustrator.Application” —when the
ActionIsRunning
ActiveDocument
Application
BrowserAvailable
Documents
FlattenerPresetsList
FreeMemory
Name
Path
PDFPresetsList
PPDFileList
Boolean
Document object
Application object
Boolean
Documents collection object
Variant
Long
String
String
Variant Array of Strings
Variant Array of Strings
Read-only. If true, an action is still running.
The active (frontmost) document in Illustrator.
Read-only. The Illustrator Application object.
Read-only. If true, a Web browser is available.
Read-only. The documents in the application.
Read-only. The list of flattener style names currently available for use.
Read-only. The amount of unused memory (in bytes) within the Adobe Illustrator partition.
Read-only. The application’s name (not related to the filename of the application file).
Read-only. The file path to the application.
Read-only. The list of preset PDF-options names available for use.
Read-only. The list of PPD files currently available for use.
Preferences
PrinterList
PrintPresetsList
ScriptingVersion
Selection
Preference Object
Variant
Variant
String
Variant Array (of objects)
Read-only. The application preferences.
Read-only. A list of available printers.
Read-only. The list of preset printing-options names currently available for use.
Read-only. The version of the Scripting plug-in.
All of the currently selected objects in the active (frontmost) document; see note for more information.
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 75
Property Value type What it is
TextFonts
TracingPresetList
UserInteractionLevel
Version
Visible

Application methods

Method Returns What it does
ConcatenateMatrix
(matrix as Matrix, secondMatrix as Matrix)
ConcatenateRotationMatrix
(matrix as Matrix, angle as Double)
ConcatenateScaleMatrix
(matrix as Matrix, [, scaleX as Double] [, scaleY as Double])
TextFonts collection
Variant Array of Strings
AiUserInteractionLevel
String
Boolean
Read-only. The installed fonts.
Read-only. The list of preset tracing-options names available for use.
Whether or not to interact with users by displaying dialogs during the running of a script.
Read-only. The version of the Adobe Illustrator application.
Read-only. If true, the application is visible.
Matrix object
Matrix object
Concatenates two matrices together.
Concatenates a rotation translation to a transformation matrix.
Matrix object
Concatenates a scale translation to a transformation matrix.
ConcatenateTranslationMatrix
(matrix as Matrix, [, deltaX as Double] [, deltaY as Double])
DoJavaScript
(action as String, from as String [, dialogs as Boolean])
DoJavaScriptFile
(action as String, from as String [, dialogs as Boolean])
DoScript
(action as String, from as String [, dialogs as Boolean])
GetIdentityMatrix
()
GetRotationMatrix
([angle as Double])
Matrix object
String
String
Nothing
Matrix object
Matrix object
Concatenates a translation to a transformation matrix.
Executes a JavaScript script contained in the
action
argument, and returns the value of the last executed statement.
Executes a JavaScript script from a file specified by the
action
argument, and returns the value of the last executed statement.
Plays an action from the Actions palette.
Returns an identity matrix.
Returns a transformation matrix containing a single rotation.
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 76
Method Returns What it does
GetScaleMatrix
([scaleX as Double] [, scaleY as Double])
GetTranslationMatrix
([deltaX as Double] [, deltaY as Double])
InvertMatrix
(matrix as Matrix)
IsEqualMatrix
(matrix as Matrix, secondMatrix as Matrix)
IsSingularMatrix
(matrix as Matrix)
Open
(files as String, [documentColorSpace as AiDocumentColorSpace], [options as Object])
Matrix object
Matrix object
Matrix object
Boolean
Boolean
Document object
Returns a transformation matrix containing a single scale.
Returns a transformation matrix containing a single translation.
Inverts a matrix.
Checks whether two matrices are equal.
Checks whether a matrix is singular and cannot be inverted.
Opens the file or files specified by the string or array of strings containing file paths.
If called to open a pre-Illustrator 9 document that contains both RGB and CMYK colors, supply
DocumentColorSpace in order to
convert all colors to the specified color space. If not supplied, Illustrator displays a dialog to the user.
Quit
()
Nothing
Quits Illustrator.
If the clipboard contains data, a dialog prompts the user to save the data for other applications. To avoid this, empty the clipboard
Clipboard.Clear.
Redraw
()
ShowPresets
(fileSpec as String)
TranslatePlaceholderText
(text as String)
Nothing
Nothing
Nothing
first with
Forces Illustrator to redraw all its windows.
Gets the presets from the file.
Translates the placeholder text to regular text. A way to enter unicode points in hex values. Member of
Illustrator.Application.
Opening a document
To open a document and obtain a reference to the document that was opened use this code:
' Open a document and get the reference to it
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 77
Dim appRef as New Illustrator.Application Dim docRef as Illustrator.Document Set docRef = appRef.Open("C:\temp\aFile.ai")
Accessing the selection
In Illustrator, the application’s Selection can be accessed as well as modified. The selection will contain
Empty when there are no selected objects. To deselect all objects in the current document, simply set the
selection to
Private Sub DeselectAll_Click()
End Sub
Empty, as the following example shows.
Dim appRef as New Illustrator.Application appRef.activeDocument.Selection = Empty
A reference to a text range is returned when there is an active insertion point in the contents of a
TextFrame. Similarly, a reference to a range of text is returned when characters are selected in the
contents of a
Executing an action
TextFrame.
You can run an action from the Action Palette from a script by using the DoScript method. When you do this, the control returns to your script before the action has completed. Use the
ActionIsRunning
property to test for when the action has completed before executing any other VB command (see the
Windows.DoAction example). If you are using VBScript, you can use the Sleep method defined on the
WScript object to insert a pause to test this property, as in the following example:
Dim appRef Set appRef = CreateObject("Illustrator.Application") appRef.DoScript "Opacity 60 (selection)", "Default Actions" WHILE(appRef.ActionIsRunning)
WScript.sleep 1000
WEND msgbox "Done"
Invoking JavaScript
DoJavaScript and DoJavaScriptFile can be used to invoke scripts written in JavaScript for
Illustrator. See the JavaScript documentation for more information on how to write JavaScripts for Illustrator.
The first argument to example, the following script displays an alert using the JavaScript
appRef.DoJavaScript "alert( 'Number of open documents: ' + _
documents.length);"
DoJavaScript() is a string that must evaluate to a valid JavaScript expression. For
alert method.
This example returns the number of open documents to Visual Basic.
Dim myNumberOfDocuments myNumberOfDocuments = appRef.DoJavaScript("documents.length;") MsgBox myNumberOfDocuments
Copy and paste between documents
This script uses the application property ActiveDocument to copy the current document’s selection to the clipboard before pasting it into our new document. This script also demonstrates how to create a new document with a specific color space and dimensions.
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 78
Dim appRef As New Illustrator.Application Dim newDocument As Illustrator.Document
If appRef.Documents.Count > 0 Then If Not IsEmpty(appRef.ActiveDocument.selection) Then appRef.ActiveDocument.Copy Set newDocument = appRef.Documents.Add(aiDocumentCMYKColor, _ 250#, 400#) newDocument.Paste End If End If
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 79

Brush

A brush in an Illustrator document. Brushes are contained in documents. Illustrator brushes can be accessed from a script, but not created or deleted.

Brush properties

Property Value type What it is
Application
Name
Parent

Brush methods

Method Returns What it does
ApplyTo
(artItem as PageItem)
Applying a Brush
This example duplicates and groups the current selection, applying the second Brush in the document to the items in the group.
Dim appRef As New Illustrator.Application Dim newGroup As Illustrator.GroupItem Dim dupItem As Object Dim artItem As Object Dim i As Integer Dim endIndex As Integer
Application
String
Object
Read-only. The Illustrator Application object.
The Brush name.
Read-only. The container object.
Nothing
Applies the brush to a specific art item.
If appRef.Documents.Count > 0 Then If Not IsEmpty(appRef.ActiveDocument.selection) Then endIndex = UBound(appRef.ActiveDocument.selection) Set newGroup = appRef.ActiveDocument.GroupItems.Add For i = 0 To endIndex Set artItem = appRef.ActiveDocument.selection(i) Set dupItem = artItem.Duplicate(newGroup, aiPlaceAtEnd) appRef.ActiveDocument.Brushes(2).ApplyTo artItem Next End If End If
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 80

Brushes

A collection of brushes in a document.

Brushes properties

Property Value type What it is
Application
Count
Parent

Brushes methods

Method Returns What it does
Index
(item as Brush)
Item
(itemKey)
Get all brushes in a document
This script displays the total number of available brushes in the current document.
Dim appRef As New Illustrator.Application Dim numBrushes As Long
If appRef.Documents.Count > 0 Then numBrushes = appRef.ActiveDocument.Brushes.Count MsgBox (“There are “ & numBrushes & “ brushes in the document.”) End If
Application
Long
Object
Long
Brush object
Read-only. The Illustrator Application object.
Read-only. Long. The number of objects in the collection.
Read-only. The document that contains this object.
Returns the index position of the object within the collection.
Returns an object reference to the object identified by itemKey
name or index).
(
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 81

CharacterAttributes

Specifies the properties of a character contained in a text frame. A CharacterStyle object associates attributes with a text range.
Note: Character attributes do not have default values, and are undefined until explicitly set.

CharacterAttributes properties

Property Value Type What it is
AkiLeft
AkiRight
Alignment
AlternateGlyphs
Application
AutoLeading
BaselineDirection
BaselinePosition
BaselineShift
Double
Double
AiStyleRunAlignmentType
AiAlternateGlyphsForm
Application object
Boolean
AiBaselineDirectionType
AiFontBaselineOption
Double
The amount of inter-glyph space added to the left side of the glyph in Japanese text (in thousandths of an em).
The amount of inter-glyph spacing added to the right side of the glyph in Japanese text (in thousandths of an em).
The character alignment type.
Specifies which kind of alternate glyphs should be used.
Read-only. The Illustrator
Application object.
If true, automatic leading must be used.
The Japanese text baseline direction.
The baseline position of text.
The amount of shift (in points) of the text baseline.
Capitalization
ConnectionForms
ContextualLigature
DiscretionaryLigature
FigureStyle
FillColor
AiFontCapsOption
Boolean
Boolean
Boolean
AiFigureStyleType
Object
Specifies whether the text is normal, all uppercase, all small caps, or a mix of small caps and lowercase.
If true, the OpenType® connection forms should be used.
If true, the contextual ligature should be used.
If true, the discretionary ligature should be used.
Specifies the figure style to use in an OpenType font.
The color of the text fill.
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 82
Property Value Type What it is
Fractions
HorizontalScale
Italics
KerningMethod
Language
Leading
Ligature
NoBreak
OpenTypePosition
Ordinals
Ornaments
Boolean
Double
Boolean
AiAutoKernType
AiLanguageType
Double
Boolean
Boolean
AiFontOpenTypePositionOption
Boolean
Boolean
Specifies whether OpenType fractions should be used.
The horizontal scaling factor for the character.
If true, the Japanese font supports italics.
Specifies the kerning method to be used.
The language of the text.
The amount of space between two lines of text, in points.
If true, the ligature should be used.
If true, no break is allowed.
The OpenType baseline position.
If true, the OpenType ordinals should be used.
If true, the OpenType ornaments should be used.
OverprintFill
OverprintStroke
Parent
ProportionalMetrics
Rotation
Size
StrikeThrough
StrokeColor
StrokeWeight
StylisticAlternates
Swash
TateChuYokoHorizontal
Boolean
Boolean
Object
Boolean
Double
Double
Boolean
Object
Double
Boolean
Boolean
Long
If true, overprint the fill of the text.
If true, overprinting of the stroke of the text is allowed.
Read-only. The object’s container.
If true, proportional metrics in Japanese OpenType is to be used.
The character rotation angle.
The font size in points.
If true, characters use strike-through style.
The color of the text stroke.
Line width of stroke.
If true, OpenType stylistic alternates should be used.
If true, the OpenType swash character should be used.
The Tate-Chu-Yoko horizontal adjustment in points.
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 83
Property Value Type What it is
TateChuYokoVertical
TextFont
Titling
Tracking
Tsume
Underline
VerticalScale
WariChuCharactersAfter Break
WariChuCharactersBefore Break
Long
TextFont
Boolean
Long
Double
Boolean
Double
Long
Long
The Tate-Chu-Yoko vertical adjustment in points.
The font used for the character.
If true, the OpenType titling alternates should be used.
The tracking or range kerning amount in thousandths of an em.
The percentage of space reduction around a Japanese character.
If true, characters are underlined.
Character vertical scaling factor.
Specifies how the characters in Wari-Chu text (an inset note in Japanese text) are divided into two or more lines.
Specifies how the characters in Wari-Chu text (an inset note in Japanese text) are divided into two or more lines.
WariChuEnabled
WariChuJustification
WariChuLineGap
WariChuLines
WariChuScale
Boolean
AiWariChuJustificationType
Long
Long
Double
Setting character attributes
' Character Attributes ' ' Open a document and add a simple text frame ' Use the CharacterAttributes object to increment ' the size of each character in the text frame.
Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document Dim textRef As Illustrator.TextFrame Dim iCount As Integer Dim i As Integer Dim dSize As Double
If true, Wari-Chu is enabled.
The Wari-Chu justification.
The Wari-Chu line gap.
The number of Wari-Chu (multiple text lines fit into a space meant for one) lines.
The Wari-Chu scale.
Set docRef = appRef.Documents.Add()
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 84
Set textRef = docRef.TextFrames.Add() textRef.Contents = "I'd rather be scripting!" textRef.Top = 500 textRef.Left = 40
dSize = 100 iCount = textRef.Characters.Count i = 1 Dim charRef Do While (i < (iCount + 1)) dSize = dSize * 1.1 textRef.TextRange.Characters(i).CharacterAttributes.HorizontalScale = dSize textRef.TextRange.Characters(i).CharacterAttributes.VerticalScale = dSize i = i + 1 Loop
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 85

Characters

A collection of TextRange objects in which each represents a single character.

Characters properties

Property Value type What it is
Application
Count
Parent

Characters methods

Method Returns What it does
Add
(contents as String [, relativeObject as TextFrame] [, insertionLocation as AiElementPlacement
AddBefore
(contents as String)
Index
(itemPtr as TextRange)
Application
Long
Object
Read-only. Application that the collection belongs to.
Read-only. Number of elements in the collection.
Read-only. The object’s container.
TextRange
Adds a new character with specified text contents at the
])
specified location in the current document. If location is not specified, adds the new character to the containing text frame after the current text selection or insertion point.
TextRange
Adds a character before the current text selection or insertion point.
Long
Returns the index position of the object within the collection.
RemoveAll
()
Counting characters
Dim appRef As New Illustrator.Application Dim numChars As Integer Dim textArt As Illustrator.TextFrame Dim textArtRange As Illustrator.TextRange
If appRef.Documents.Count > 0 Then numChars = 0 For Each textArt In appRef.ActiveDocument.TextFrames Set textArtRange = textArt.TextRange numChars = numChars + textArtRange.length Next MsgBox ("There are " & numChars & " characters in the document.") End If
Nothing
Deletes every element in the collection.
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 86

CharacterStyle

A named style that specifies character attributes. For an example, see CharacterStyles.

CharacterStyle properties

Property Value type What it is
Application
CharacterAttributes
Name
Parent

CharacterStyle methods

Method Returns What it does
ApplyTo
(textItem as Object [, clearingOverrides as Boolean])
Delete
()
Application
CharacterAttributes
String
Object
Nothing
Nothing
Read-only. Application to which the collection belongs.
Read-only. The character properties for the text range.
The character style’s name.
Read-only. The object’s container.
Applies the character style to the text object or objects.
Deletes the object.
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 87

CharacterStyles

A collection of character styles.

CharacterStyles properties

Property Value type What it is
Application
Count
Parent
Application
Long
Object

CharacterStyles methods

Method Returns What it does
Add
(Name as String)
Index
(itemPtr as CharacterStyle)
Item
(itemKey)
RemoveAll
()
Create and apply character styles
' Open a document, and add 3 simple text frames ' Create a new character style and apply it to ' each of the text frames
Read-only. Application to which the collection belongs.
Read-only. Number of elements in the collection.
Read-only. The object’s container.
CharacterStyle
Long
Creates a named character style.
Returns the index position of the object within the collection.
CharacterStyle
Nothing
Returns an object reference to the object identified by
itemKey (name or index).
Deletes all objects in this collection.
Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document Dim textRef1 As Illustrator.TextFrame Dim textRef2 As Illustrator.TextFrame Dim textRef3 As Illustrator.TextFrame
' Create a new document add a 3 simple text items Set docRef = appRef.Documents.Add() Set textRef1 = docRef.TextFrames.Add() textRef1.Contents = "Scripting is fun!" textRef1.Top = 700 textRef1.Left = 50
Set textRef2 = docRef.TextFrames.Add() textRef2.Contents = "Scripting is easy!" textRef2.Top = 625 textRef2.Left = 100
Set textRef3 = docRef.TextFrames.Add()
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 88
textRef3.Contents = "Everyone should script!" textRef3.Top = 550 textRef3.Left = 150 appRef.Redraw
' Create a new character style MsgBox "Create and apply a character style 'BigRed'."
Dim charStyle As Illustrator.CharacterStyle Set charStyle = docRef.CharacterStyles.Add("BigRed")
' Create a red color Dim colorRed As New Illustrator.RGBColor colorRed.Red = 255
' Set character attributes of the new style With charStyle.CharacterAttributes .Size = 40 .Tracking = -50 .Capitalization = aiNormalCaps .FillColor = colorRed End With
' apply style to each textFrame in the document charStyle.ApplyTo textRef1.TextRange charStyle.ApplyTo textRef2.TextRange charStyle.ApplyTo textRef3.TextRange
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 89

CMYKColor

A CMYK color specification, used to apply a CMYK color to a layer or art item.
If the color space of a document is RGB and you specify the color value for a page item in that document using CMYK, Illustrator will translate the CMYK color specification into an RGB color specification. The same thing happens if the document’s color space is CMYK and you specify colors using RGB. Since this translation can lose information, you should specify colors using the class that matches the document’s actual color space.

CMYKColor properties

Property Value type What it is
Application
Black
Cyan
Magenta
Yellow
Setting CMYK colors
Dim appRef As New Illustrator.Application Dim frontPath As Illustrator.PathItem Dim newCMYKColor As New Illustrator.CMYKColor
' Get a reference to the frontmost path in the document Set frontPath = appRef.ActiveDocument.PathItems(1)
' Set color values for the CMYK objects ' then wrap the color in a standard color object newCMYKColor.Black = 0 newCMYKColor.Cyan = 30.4 newCMYKColor.Magenta = 32 newCMYKColor.Yellow = 0
Application object
Double
Double
Double
Double
Read-only. The Illustrator Application object.
The black color value. Range 0.0 to 100.0
The cyan color value. Range 0.0 to 100.0
The magenta color value. Range 0.0 to 100.0
The yellow color value. Range 0.0 to 100.0
frontPath.Filled = True frontPath.fillColor = newCMYKColor
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 90

CompoundPathItem

Compound paths are objects composed of multiple intersecting paths, resulting in transparent interior spaces where the original paths overlapped. The PathItems property provides access to the paths that make up the compound path.
All paths in a compound path share property values. Therefore, if you set the value of a property of any one of the paths in the compound path, all other path’s matching property will be updated to the new value.
Paths contained within a compound path or group in a document are returned as individual paths when a script asks for the paths contained in the document. However, paths contained in a compound path or group are not returned when a script asks for the paths in a layer which contains the compound path or group.

CompoundPathItem properties

Property Value type What it is
Application
ArtworkKnockout
BlendingMode
ControlBounds
Editable
GeometricBounds
Height
Hidden
IsIsolated
Layer
Left
Locked
Application object
AiKnockoutState
AiBlendModes
Variant Array of 4 Doubles
Boolean
Variant Array of 4 Doubles
Double
Boolean
Boolean
Layer object
Double
Boolean
Read-only. The Illustrator Application object.
Is this object used to create a knockout? If so, what kind of knockout?
The mode used when compositing an object.
Read-only. The bounds of the object including stroke width and controls.
Read-only. If true, the object is editable.
Read-only. The bounds of the object excluding stroke width.
The height of the object, excluding stroke width, calculated from the
GeometricBounds.
If true, this object is hidden.
If true, this object is isolated.
Read-only. The layer to which this object belongs.
The left position of the object.
If true, the object is locked.
Name
Opacity
Parent
PathItems
String
Double
Document object
PathItems collection object
The name of this object.
The opacity of the object. The value is between 0.0 and
100.0.
Read-only. The document that contains this object.
Read-only. The path art items in this compound path.
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 91
Property Value type What it is
Position
Selected
Sliced
Tags
Top
URL
VisibilityVariable
VisibleBounds
Width
WrapInside
WrapOffset
Wrapped
Variant Array of 2 Doubles
Boolean
Boolean
Tags collection object
Double
String
Variable
Variant Array of 4 Doubles
Double
Boolean
Double
Boolean
The position of the top left corner of the
CompoundPathItem excluding stroke width.
If true, the object is selected.
If true, the CompoundPathItem is sliced. Default: false
Read-only. The tags contained in this object.
The top position of the object.
The value of the Adobe URL tag assigned to this object.
The VisibilityVariable bound to this object.
Read-only. The visible bounds of the object including stroke width.
The width of the object, excluding stroke width, calculated from the
GeometricBounds.
If true, the text frame object should be wrapped inside this object.
The offset to use when wrapping text around this object.
If true, wrap text frame objects around this object (text frame must be above the object).
ZOrderPosition
Long

CompoundPathItem methods

Method Returns What it does
Copy
()
Cut
()
Delete
()
Duplicate
([relativeObject as Object], [insertionLocation as AiElementPlacement])
Move
(relativeObject as Object, insertionLocation as AiElementPlacement
Read-only. The position of this art item within the stacking order of the group or layer (
Parent) that contains the art
item.
Nothing
Copies the compound path to the clipboard. The associated document must be the frontmost document.
Nothing
Cuts the compound path onto the clipboard. The associated document must be the frontmost document.
Nothing
Object
Deletes the object.
Duplicates the art item, optionally specifying the location and position for the copy.
Nothing
Moves the art item, specifying the new location and position.
)
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 92
Method Returns What it does
Resize
(scaleX as Double, scaleY as Double, [, changePositions as Boolean] [, changeFillPatterns as Boolean] [, changeFillGradients as Boolean] [, changeStrokePattern as Boolean] [, changeLineWidths as Double] [, scaleAbout as AiTransformation
])
Rotate
(angle as Double, [, changePositions as Boolean] [, changeFillPatterns as Boolean] [, changeFillGradients as Boolean] [, changeStrokePattern as Boolean] [, rotateAbout as AiTransformation
])
Transform
(transformationMatrix as Matrix, [, changePositions as Boolean] [, changeFillPatterns as Boolean] [, changeFillGradients as Boolean] [, changeStrokePattern as Boolean] [, changeLineWidths as Double] [, transformAbout as AiTransformation
Translate
([deltaX as Double] [, deltaY as Double] [, transformObjects as Boolean] [, transformFillPatterns as Boolean] [, transformFillGradients as Boolean] [, transformStrokePatterns as Boolean])
])
Nothing
Nothing
Nothing
Nothing
Scales the compound path where
scaleX is the horizontal scaling factor
and
scaleY is the vertical scaling factor;
100.0 = 100%
Rotates the art item relative to the current rotation. The object is rotated counter-clockwise if the
Angle value is
positive, clockwise if the value is negative.
Transforms the compound path by applying a transformation matrix.
Repositions the compound path relative to the current position, where
deltaX is the horizontal offset and deltaY is the vertical offset.
ZOrder
(zOrderCmd as AiZOrderMethod)
Nothing
Arranges the compound path’s position in the stacking order of the group or layer (
Parent) of this object.
Selecting paths in a document
This example demonstrates how to select all of the paths in a document that are not part of a compound path or a group by testing the type of the
Parent property with a TypeName function.
Dim appRef As New Illustrator.Application Dim pathArt As Illustrator.PathItem
If appRef.Documents.Count > 0 Then If appRef.ActiveDocument.PathItems.Count > 0 Then For Each pathArt In appRef.ActiveDocument.PathItems If (Not TypeName(pathArt.Parent) = “CompoundPathItem”) Then _ pathArt.Selected = True Next End If End If
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 93
Creating a compound path
This example demonstrates how to create a new compound path containing three PathItems. The example then modifies the stroke of the paths in the compound path. Note that when you modify the properties of a
PathItem inside a compound path you affect all paths contained in the compound path.
The example also shows how to access swatches in a document by name.
Dim appRef As New Illustrator.Application Dim frontDocument As Illustrator.Document Dim activeLayer As Illustrator.Layer Dim newCompoundPath As Illustrator.CompoundPathItem Dim newPath As Illustrator.PathItem
Set frontDocument = appRef.ActiveDocument Set activeLayer = frontDocument.activeLayer Set newCompoundPath = activeLayer.CompoundPathItems.Add
' Create the path items Set newPath = newCompoundPath.PathItems.Add newPath.SetEntirePath Array(Array(30, 50), Array(30, 100))
Set newPath = newCompoundPath.PathItems.Add newPath.SetEntirePath Array(Array(40, 100), Array(100, 100))
Set newPath = newCompoundPath.PathItems.Add newPath.SetEntirePath Array(Array(100, 110), Array(100, 300))
' Set the gradient of the compound path newPath.Stroked = True newPath.StrokeWidth = 3.5 newPath.StrokeColor = frontDocument.Swatches(8).Color
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 94

CompoundPathItems

A collection of compound paths.

CompoundPathItems properties

Property Value type What it is
Application
Count
Parent
Application object
Long
Document object

CompoundPathItem methods

Method Returns What it does
Add
()
Index
(item as CompoundPathItem)
Item
(itemKey)
RemoveAll
()
Counting compound paths
Read-only. The Illustrator Application object.
Read-only. The number of objects in the collection.
Read-only. The document that contains this object.
CompountPathItem object
Long
CompoundPathItem object
Nothing
Creates a new CompoundPathItem object.
Returns the index position of the object within the collection.
Returns an object reference to the object identified by
itemKey (name or index).
Deletes all objects in this collection.
This example displays the total number of compound paths contained in the first layer of the current document.
Dim appRef As New Illustrator.Application Dim numCPaths As Integer
If appRef.Documents.Count > 0 Then numCPaths = appRef.ActiveDocument.Layers(1).CompoundPathItems.Count MsgBox (“There are “ & numCPaths & “ compound paths in document.”) End If
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 95

DataSet

A set of data used for dynamic publishing. A dataset allows you to collect a number of variables and their dynamic data into one object. You must have at least one variable bound to an art item in order to create a
DataSet object.
See the Variable class, and Working with Variables and Datasets for more information.
See DataSets for a sample script that uses a DataSet object.

DataSet properties

Property Value type What it is
Application
Name
Parent

DataSet methods

Method Returns What it does
Delete
()
Display
()
Update
()
Application object
String
Document object
Nothing
Nothing
Nothing
Read-only. The Illustrator Application object.
The name of the DataSet.
Read-only. The name of the object that is this DataSet object’s parent.
Deletes the object.
Displays the DataSet.
Updates the DataSet.
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 96

DataSets

A collection of DataSet objects.

DataSets properties

Property Value type What it is
Application
Count
Parent

DataSets methods

Method Returns What it does
Add
()
Index
(item as DataSets)
Item
(itemKey)
RemoveAll
()
Creating datasets
Application object
Long
Document object
Read-only. The Illustrator Application object.
Read-only. The number of datasets in the collection.
Read-only. The name of the object that is this DataSet object’s parent.
DataSet object
Long
Creates a new DataSet object.
Returns the index position of the object within the collection.
DataSet object
Nothing
Returns an object reference to the object identified by
itemKey (name or index).
Deletes all objects in this collection.
' Variables and Datasets ' ' Create two variables (visibility and text) ' Create two datasets with different values ' Display both datasets
Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document Set docRef = appRef.Documents.Add()
' Create a visibility variable Dim itemRef As Illustrator.pathItem Set itemRef = docRef.PathItems.Rectangle(600, 200, 150, 150) Dim colorRef As New RGBColor colorRef.Red = 255 itemRef.FillColor = colorRef Dim visibilityVar As Illustrator.Variable Set visibilityVar = docRef.Variables.Add() visibilityVar.Kind = aiVisibility itemRef.VisibilityVariable = visibilityVar
' Create a text variable
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 97
Dim textRef As Illustrator.TextFrame Set textRef = docRef.TextFrames.Add textRef.Contents = "Text Variable, dataset 1" textRef.Top = 400 textRef.Left = 200 Dim textVar As Illustrator.Variable Set textVar = docRef.Variables.Add textVar.Kind = aiTextual textRef.ContentVariable = textVar
MsgBox "There are " & CStr(docRef.Variables.Count) & " variables" MsgBox "Creating new datasets."
' Create a dataset Dim ds1 As Illustrator.DataSet Set ds1 = docRef.DataSets.Add()
' Change data and create a 2nd dataset itemRef.Hidden = True textRef.Contents = "Text Variable, dataset 2" Dim ds2 As Illustrator.DataSet Set ds2 = docRef.DataSets.Add()
' Display datasets MsgBox "Switching to dataset 1" ds1.Display MsgBox "Switching to dataset 2" ds2.Display
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 98

Document

An Illustrator document. Documents are contained in the Application object.
The default document settings—those properties starting with the word “Default”—are global settings that affect the current document. Be sure to modify these default properties only when a document is open. Note that if you set default properties to desired values before creating new objects, you can streamline your scripts, eliminating the need to specify properties such as have analogous default properties.
FillColor and Stroked that
A document’s
DocumentColorSpace, Height, and Width can only be set when the document is
created. Once a document is created, these properties cannot be changed.
The frontmost document can be referred to as either
AppRef.Documents(1).

Document properties

Property Value type What it is
ActiveDataSet
ActiveLayer
ActiveView
Application
Brushes
CharacterStyles
CompoundPathItems
AppRef.ActiveDocument or
DataSet object
Layer object
View object
Application object
Brushes collection object
CharacterStyles
CompoundPathItems collection object
The active DataSet object in the document.
The active Layer in the document.
Read-only. The document’s current View.
Read-only. The Illustrator Application object.
Read-only. The Brushes contained in the document.
Read-only. The list of character styles in this document.
Read-only. The CompoundPathItems contained in the document.
CropBox
CropStyle
DataSets
DefaultFillColor
DefaultFilled
DefaultFillOverprint
DefaultStrokeCap
Variant Array of 4 Doubles
AiCropOptions
DataSet object
Color object
Boolean
Boolean
AiStrokeCap
The boundary of the document’s cropping box for output.
A document does not have a default
CropBox.
In order to read this property you have to set
CropBox first.
the
The style of the document’s cropping box.
Read-only. A DataSets collection in the document.
The Color to fill new paths if default filled is
true.
If true, a new path should be filled.
If true, the art beneath a filled object should be overprinted by default.
Default type of line capping for paths created.
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 99
Property Value type What it is
DefaultStrokeColor
DefaultStroked
DefaultStrokeDashes
DefaultStrokeDashOffset
DefaultStrokeJoin
DefaultStrokeMiterLimit
DefaultStrokeOverprint
Color object
Boolean
Variant Array of Doubles
Double
AiStrokeJoin
Double
Boolean
The stroke color for new paths if default stroked is
true.
If true, the new path should be stroked.
Default lengths for dashes and gaps in dashed lines, starting with the first dash length, followed by the first gap length, and so on. Set to an empty variant array for solid line.
The default distance into the dash pattern at which the pattern should be started for new paths.
Default type of joints in new paths.
When a default stroke join is set to mitered, this property specifies when the join will be converted to beveled (squared-off) by default. The default miter limit of 4 means that when the length of the point reaches four times the stroke weight, the join switches from a miter join to a bevel join. Range: 1 to 500; a value of 1 specifies a bevel join.
If true, the art beneath a stroked object should be overprinted by default.
DefaultStrokeWidth
DocumentColorSpace
FullName
GeometricBounds
Gradients
GraphicStyles
GraphItems
GroupItems
Height
Double
AiDocumentColorSpace
String
Variant Array of 4 Doubles
Gradients collection object
GraphicStyles collection object
collection object
GroupItems collection object
Double
Default width of stroke for new paths.
Read-only. The color specification system to use for this document’s color space.
Read-only. The file associated with the document, which includes the complete path to the file.
Read-only. The bounds of the illustration excluding the stroke width of any objects in the document.
Read-only. The Gradients collection contained in the document.
Read-only. The GraphicStyles contained in the document.
Read-only. The GraphItems collection contained in the document.
Read-only. The GroupItems collection contained in the document.
Read-only. The height of the document, calculated from the
GeometricBounds.
Adobe Illustrator CS2
Visual Basic Scripting Reference Visual Basic Object Reference 100
Property Value type What it is
InkList
KinsokuSet
Layers
LegacyTextItems
MeshItems
MojikumiSet
Name
OutputResolution
PageItems
PageOrigin
Variant Array
Object
Layers collection object
LegacyTextItems
MeshItems collection object
Object
String
Double
PageItems collection object
Variant Array of 2 Doubles
Read-only. The list of inks in this document.
Read-only. The Kinsoku set of characters that cannot begin or end a line of Japanese text.
Read-only. The layers contained in the document.
Read-only. The text frame items in this story.
Read-only. The mesh art items contained in the document.
Read-only. A list of names of predefined Mojikumi sets which specify the spacing for the layout and composition of Japanese text.
Read-only. The document’s name (not the complete file path to the document).
The current output resolution for the document in dots per inch (dpi).
Read-only. The PageItems (contains all art item classes) contained in the document.
The zero-point of the page in the document without margins, relative to the overall height and width.
ParagraphStyles
Parent
Path
PathItems
Patterns
PlacedItems
PluginItems
PrintTiles
RasterItems
ParagraphStyles
Application object
String
PathItems collection object
Patterns collection object
PlacedItems collection object
PluginItems collection object
Boolean
RasterItems collection object
Read-only. The list of paragraph styles in this document.
Read-only. The application that contains this document.
Read-only. The file associated with the document, which includes the complete path to the file.
Read-only. The PathItems contained in this document.
Read-only. The patterns contained in this document.
Read-only. The PlacedItems contained in this document.
Read-only. The PluginItems contained in this document.
Read-only. If true, this document should be tiled when printed.
Read-only. The raster items contained in this document.
Loading...