Adobe 26001360 Scripting Guide - Page 365
Example 35.1, Table 5.71, Lines - Methods
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 365 highlights
Adobe Illustrator CS Scripting Guide Table 5.71 Lines - Methods Method Index(ItemPtr As TextRange) Returns Long Item(ItemKey) TextRange RemoveAll() Nothing 365 What it does Returns the index position of the object within the collection Returns an object reference to the object identified by itemKey; by name or index Deletes all objects in this collection Example 35.1 ' Lines ' ' Create an area text item and add some text ' Display the line count, then resize it and ' display the line count again. ' ' Create an area text Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document Set docRef = appRef.Documents.Add() Dim itemRef As Illustrator.pathItem Set itemRef = docRef.PathItems.Rectangle(500, 200, 50, 300) Dim textRef As Illustrator.TextFrame Set textRef = docRef.TextFrames.AreaText(itemRef) textRef.Contents = "Scripting with Illustrator is fun and easy." appRef.Redraw MsgBox "There are " & CStr(textRef.Lines.Count) & " lines." ' change the path's width and display line count itemRef.Width = 300 appRef.Redraw MsgBox "Now there are " & CStr(textRef.Lines.Count) & " lines." 12 Aug 03