Adobe 26001360 Scripting Guide - Page 446
Example 81.1, Table 5.152, Symbols - Methods, Symbols - Properties
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 446 highlights
446 Table 5.151 Symbols - Properties Property R/O Value type Parent R/O Document object Visual Basic Reference What it is The document that contains this Symbols object Table 5.152 Symbols - Methods Method Returns Add(SourceArt As Object) Symbol object Index(item As Symbol) Long item(itemKey) Swatch object RemoveAll() Nothing What it does Creates a new symbol in the document based on an art item 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 81.1 ' Symbols ' ' Create a simple path item from each graphic style ' and then add the item as a new symbol ' Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document Set docRef = appRef.Documents.Add() Dim y As Integer y = docRef.Height - 30 Dim iCount As Integer iCount = docRef.GraphicStyles.Count MsgBox "There are " + CStr(iCount) + " symbols." Dim styleRef As Illustrator.GraphicStyle Dim itemRef As Illustrator.pathItem Dim symbolRef As Illustrator.Symbol Dim i As Integer i = 2 Do While (i < (iCount + 1)) ' create a PathItem and apply the style to it Set styleRef = docRef.GraphicStyles(i) Set itemRef = docRef.PathItems.Rectangle(y, 100, 20, 20) styleRef.ApplyTo itemRef 12 Aug 03