
Adobe Photoshop CS3
JavaScript Scripting Reference
JavaScript Object Reference 143
PathItems
The collection of
pathItem
objects in the document. See
PathItem
for information on
pathItem
objects.
Note:
Because the
PathItems
class is a property of the
Document
object, you use the property name,
pathItems
, rather than the class name,
PathItems
, in your code. For example:
var myPathItem = docRef.pathItems.add(“A Line”, lineSubPathArray)
The following sample uses the
PathItems
object incorrectly:
var myPathItem = docRef.PathItems.add(“A Line”, lineSubPathArray)
Properties
Methods
Property
Value Type
What it is
length
number (long)
Read-only. The number of
pathItem
objects in the
pathItems
collection.
parent
object (document)
Read-only. The
pathItems
object's container.
typename
string
Read-only. The class name of the referenced
pathItems
object.
Method
Parameter Type
Returns
What it does
index
(itemKey)
number
PathItem
Gets a
pathItem
object from the
pathItems
collection.
add
(name,
entirePath)
string
array of
SubPathInfo
objects
PathItem
Creates a new
PathItem
object from the sub
paths defined in the array provided in the
entirePath
parameter.
A new
SubPathItem
object is created for
each
SubPathInfo
object provided in
entirePath
, and those
SubPathItem
objects are added to the
SubPathItems
collection of the returned
PathItem
.
getByName
(name)
string
PathItem
Get the first element in the
pathItems
collection with the provided name.
removeAll
()
Removes all
pathItem
objects from the
pathItems
collection.