Adobe 26001360 Scripting Guide - Page 388
Notes, Example 47.1, PathItem, SetEntirePath
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 388 highlights
388 Visual Basic Reference Notes The PathItem class give you complete access to paths in Illustrator. The SetEntirePath method provides an extremely efficient way to create paths which consist of straight lines. Example 47.1 This script sets the stroke color and the fill color of the first path in the frontmost document. Dim appRef As New Illustrator.Application Dim frontDocument As Illustrator.Document Dim firstPath As Illustrator.PathItem Set frontDocument = appRef.ActiveDocument Set firstPath = frontDocument.PathItems(1) firstPath.Filled = True firstPath.fillColor = frontDocument.Swatches(10).Color firstPath.Stroked = True firstPath.StrokeWidth = 5 Example 47.2 This script illustrates the use of the SetEntirePath method to create a new path consisting of straight lines. Dim appRef As New Illustrator.Application Dim frontDocument As Illustrator.Document Dim newPath As Illustrator.PathItem Dim lineList(10) As Variant Dim index As Integer For index = 0 To 10 lineList(index) = Array(index * 10 + 50, (index - 5) ^ 2 * 5 + 50) Next Set frontDocument = appRef.ActiveDocument Set newPath = frontDocument.PathItems.Add 12 Aug 03