Adobe 26001360 Scripting Guide - Page 51
In Visual Basic, Object is a mesh
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 51 highlights
Adobe Illustrator CS Scripting Guide 51 In Visual Basic: 'Selection sorter Private Sub Command1_Click() Dim appRef As New Illustrator.Application Dim documentRef As Illustrator.Document Set documentRef = appRef.ActiveDocument selectedObjects = documentRef.Selection If TypeName(selectedObjects) = "String" Then 'text is selected Else 'Is anything selected? If selectedObjects = Empty Then GoTo noSelection For Each artObject In selectedObjects selectedObjectClass = TypeName(artObject) Select Case selectedObjectClass 'Something is selected, let's find out what it is. Case "PathItem" 'Object is a path item Case "CompoundPathItem" 'Object is a compound path Case "RasterItem" 'Object is a raster image Case "PlacedItem" 'Object is a placed image Case "MeshItem" 'Object is a mesh Case "TextFrameItem" 'Object is a text frame item Case "PluginItem" 'Object is a plugin art item Case "PathPoint" 'Object is a point of a path Case "GroupItem" 'Object is a group of objects End Select Next End If Exit Sub noSelection: MsgBox "Select an object and try again." End Sub 12 Aug 03