Adobe 26001360 Scripting Guide - Page 463
MsgBox Now there are & CStrdocRef.TextFrames.Count & TextFrames.
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 463 highlights
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