86
Valid Commands
• count
• delete
• duplicate
• exists
• move
Notes
Paths contained within a compound path or group in a document will be returned as individual
paths when a script asks for the paths contained in the document. However, paths contained in
a compound path or group will not be returned when a script asks for the paths in a layer which
contains the compound path or group.
All paths inside of a compound path share property values. Therefore, if you set the value of a
property of any one of the paths in the compound path, all other path's matching property will
be updated to the new value.
Example 6.1
This example demonstrates how to get a list containing all of the paths in a document that are
not part of a compound path or a group by iterating through each layer in the document.
-- A handler which return paths in a document that are not part of a
-- compound path or group
to GetPathItemsOfDocument(docRef)
tell application "Illustrator CS"
set pathItemList to {}
set layerCount to count layers of docRef
repeat with i from 1 to layerCount
set pathItemList to pathItemList & every path item of layer i of docRef
end repeat
end tell
return pathItemList
end GetPathItemsOfDocument
-- Call handler
tell application "Illustrator CS" to set docRef to current document
set allPathItems to GetPathItemsOfDocument(docRef)
• translate
• rotate
• scale
• transform
12 Aug 03
AppleScript Reference