Adobe 26001360 - Illustrator CS - PC Manual page 463

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

Advertisement

Adobe Illustrator CS Scripting Guide
463
Set rectRef = docRef.PathItems.Rectangle(700, 50, 100, 100)
Dim areaTextRef As Illustrator.TextFrame
Set areaTextRef = docRef.TextFrames.AreaText(rectRef)
areaTextRef.Contents = "TextFrame #1"
areaTextRef.Selected = True
' Line Text
Dim lineRef As Illustrator.pathItem
Set lineRef = docRef.PathItems.Add()
lineRef.SetEntirePath (Array(Array(200, 700), Array(300, 550)))
Dim pathTextRef As Illustrator.TextFrame
Set pathTextRef = docRef.TextFrames.PathText(lineRef)
pathTextRef.Contents = "TextFrame #2"
pathTextRef.Selected = True
' Point Text
Dim pointTextRef As Illustrator.TextFrame
Set pointTextRef = docRef.TextFrames.Add()
pointTextRef.Contents = "TextFrame #3"
pointTextRef.Top = 700
pointTextRef.Left = 400
pointTextRef.Selected = True
appRef.Redraw
Dim sText As String
sText = "There are " & CStr(docRef.TextFrames.Count) & " TextFrames."
sText = sText & vbCrLf & "Changing contents of each TextFrame."
MsgBox sText
' change the content of each
areaTextRef.Contents = "Area TextFrame."
pathTextRef.Contents = "Path TextFrame."
pointTextRef.Contents = "Point TextFrame."
appRef.Redraw
MsgBox "Removing 1 TextFrame."
docRef.TextFrames(2).Delete
appRef.Redraw
' count again, count should reduce by 1.
MsgBox "Now there are " & CStr(docRef.TextFrames.Count) & " TextFrames."
12 Aug 03

Advertisement

Table of Contents
loading

This manual is also suitable for:

Illustrator cs

Table of Contents