Adobe 26001360 - Illustrator CS - PC Manual page 446

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

Advertisement

446
Table 5.151 Symbols — Properties
Property
Parent
Table 5.152 Symbols — Methods
Method
Add(SourceArt As Object)
Index(item As Symbol)
item(itemKey)
RemoveAll()
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
R/O
Value type
R/O
Document object
Returns
Symbol object
Long
Swatch object
Nothing
12 Aug 03
Visual Basic Reference
What it is
The document that contains this
Symbols object
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

Advertisement

Table of Contents
loading

This manual is also suitable for:

Illustrator cs

Table of Contents