Adobe 26001360 Scripting Guide - Page 454
Tags, Table 5.160, Tags - Properties, Tags - Methods
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 454 highlights
454 Tags A collection of tags. Visual Basic Reference Table 5.160 Tags - Properties Property Application Count Parent R/O Value type What it is 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 Tags object Table 5.161 Tags - Methods Method Add Index(item As Tag) Item(itemKey) RemoveAll() Returns Tag object Long Tag object Nothing What it does Creates a new object 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 84.1 This example illustrates how to mark all images in a document with a specific tag. If your script creates temporary PageItems, you can then later look at the "MyInfo" tag. If it exist for a particular PageItem and it's value is "OriginalItem" you know not to delete it. Dim appRef As New Illustrator.Application Dim frontDocument As Illustrator.Document Dim imageArt As Object Dim tagRef As Illustrator.Tag Set frontDocument = appRef.ActiveDocument For Each imageArt In frontDocument.PageItems If ((imageArt.PageItemType = aiPlacedItem) Or _ (imageArt.PageItemType = aiRasterItem)) Then 'Create a new Tag with the name myInfo and the value originalItem Set tagRef = imageArt.Tags.Add tagRef.Name = "MyInfo" tagRef.Value = "OriginalItem" End If 12 Aug 03