Adobe 26001360 Scripting Guide - Page 359
Layers, Notes, Example 34.1
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 359 highlights
Adobe Illustrator CS Scripting Guide 359 'Get a reference to the layers, and obtain the total number Set frontDocument = appRef.ActiveDocument countOfLayers = frontDocument.Layers.Count If (frontDocument.Layers.Count < countOfLayers) Then MsgBox "The frontmost application only has 1 layer" Exit Sub End If Layers A collection of layers. Table 5.65 Layers - Properties Property R/O Value type What it is Application Count Parent R/O Application object The Illustrator Application object R/O Long The number of objects in the collection R/O object The object that contains this Layer (the Parent can also be another Layer) Table 5.66 Layers - Methods Method Returns Add Index(item As Layer) Layer object Long RemoveAll() Nothing What it does Creates a new object Returns the index position of the object within the collection Deletes all objects in this collection Notes Illustrator's Layer object contains all of the PageItems in the specific layer. Your script can access objects through the Layer object or through the Document object. Example 34.1 This example illustrates how to delete all layers whose name starts with the word "Temporary" in all open documents. 12 Aug 03