PlacedItem
PlacedItem
Section titled “PlacedItem”app.activeDocument.placedItems[index]
Description
Section titled “Description”An artwork item placed in a document as a linked file.
For example, an artwork object created using the File > Place
command in Illustrator or using the add()
method of the placedItems
collection object is a placed item.
For information, see PlacedItems.
Properties
Section titled “Properties”PlacedItem.artworkKnockout
Section titled “PlacedItem.artworkKnockout”app.activeDocument.placedItems[index].artworkKnockout
Description
Section titled “Description”Is this object used to create a knockout, and if so, what kind of knockout.
PlacedItem.blendingMode
Section titled “PlacedItem.blendingMode”app.activeDocument.placedItems[index].blendingMode
Description
Section titled “Description”The blend mode used when compositing an object.
PlacedItem.boundingBox
Section titled “PlacedItem.boundingBox”app.activeDocument.placedItems[index].boundingBox
Description
Section titled “Description”The dimensions of the placed art item regardless of transformations.
Array of 4 numbers
PlacedItem.contentVariable
Section titled “PlacedItem.contentVariable”app.activeDocument.placedItems[index].contentVariable
Description
Section titled “Description”The content variable bound to the item.
PlacedItem.controlBounds
Section titled “PlacedItem.controlBounds”app.activeDocument.placedItems[index].controlBounds
Description
Section titled “Description”The bounds of the object including stroke width and controls.
Array of 4 numbers; read-only.
PlacedItem.editable
Section titled “PlacedItem.editable”app.activeDocument.placedItems[index].editable
Description
Section titled “Description”If true
, this item is editable.
Boolean; read-only.
PlacedItem.file
Section titled “PlacedItem.file”app.activeDocument.placedItems[index].file
Description
Section titled “Description”The file containing the artwork.
File object; read-only.
PlacedItem.geometricBounds
Section titled “PlacedItem.geometricBounds”app.activeDocument.placedItems[index].geometricBounds
Description
Section titled “Description”The bounds of the object excluding stroke width.
Array of 4 numbers; read-only.
PlacedItem.height
Section titled “PlacedItem.height”app.activeDocument.placedItems[index].height
Description
Section titled “Description”The height of the group item.
Number (double)
PlacedItem.hidden
Section titled “PlacedItem.hidden”app.activeDocument.placedItems[index].hidden
Description
Section titled “Description”If true
, this item is hidden.
Boolean
PlacedItem.isIsolated
Section titled “PlacedItem.isIsolated”app.activeDocument.placedItems[index].isIsolated
Description
Section titled “Description”If true
, this object is isolated.
Boolean
PlacedItem.layer
Section titled “PlacedItem.layer”app.activeDocument.placedItems[index].layer
Description
Section titled “Description”The layer to which this item belongs.
Layer; read-only.
PlacedItem.left
Section titled “PlacedItem.left”app.activeDocument.placedItems[index].left
Description
Section titled “Description”The position of the left side of the item (in points, measured from the left side of the page).
Number (double)
PlacedItem.locked
Section titled “PlacedItem.locked”app.activeDocument.placedItems[index].locked
Description
Section titled “Description”If true
, this item is locked.
Boolean
PlacedItem.matrix
Section titled “PlacedItem.matrix”app.activeDocument.placedItems[index].matrix
Description
Section titled “Description”The transformation matrix of the placed artwork.
PlacedItem.name
Section titled “PlacedItem.name”app.activeDocument.placedItems[index].name
Description
Section titled “Description”The name of this item.
String
PlacedItem.note
Section titled “PlacedItem.note”app.activeDocument.placedItems[index].note
Description
Section titled “Description”The note assigned to this item.
String
PlacedItem.opacity
Section titled “PlacedItem.opacity”app.activeDocument.placedItems[index].opacity
Description
Section titled “Description”The opacity of the object.
Range: 0.0 to 100.0
Number (double)
PlacedItem.parent
Section titled “PlacedItem.parent”app.activeDocument.placedItems[index].parent
Description
Section titled “Description”The parent of this object.
PlacedItem.position
Section titled “PlacedItem.position”app.activeDocument.placedItems[index].position
Description
Section titled “Description”The position (in points) of the top left corner of the pluginItem
object in the format [x, y]. Does not include stroke weight.
Array of 2 numbers; read-only.
PlacedItem.selected
Section titled “PlacedItem.selected”app.activeDocument.placedItems[index].selected
Description
Section titled “Description”If true
, this item is selected.
Boolean
PlacedItem.sliced
Section titled “PlacedItem.sliced”app.activeDocument.placedItems[index].sliced
Description
Section titled “Description”If true
, the item sliced.
Default: false
Boolean
PlacedItem.tags
Section titled “PlacedItem.tags”app.activeDocument.placedItems[index].tags
Description
Section titled “Description”The tags contained in this item.
Tags; read-only.
PlacedItem.top
Section titled “PlacedItem.top”app.activeDocument.placedItems[index].top
Description
Section titled “Description”The position of the top of the item (in points, measured from the bottom of the page).
Number (double)
PlacedItem.typename
Section titled “PlacedItem.typename”app.activeDocument.placedItems[index].typename
Description
Section titled “Description”The class name of the referenced object.
String; read-only.
PlacedItem.uRL
Section titled “PlacedItem.uRL”app.activeDocument.placedItems[index].uRL
Description
Section titled “Description”The value of the Adobe URL tag assigned to this item.
String
PlacedItem.visibilityVariable
Section titled “PlacedItem.visibilityVariable”app.activeDocument.placedItems[index].visibilityVariable
Description
Section titled “Description”The visibility variable bound to the item.
PlacedItem.visibleBounds
Section titled “PlacedItem.visibleBounds”app.activeDocument.placedItems[index].visibleBounds
Description
Section titled “Description”The visible bounds of the item including stroke width.
Array of 4 numbers; read-only.
PlacedItem.width
Section titled “PlacedItem.width”app.activeDocument.placedItems[index].width
Description
Section titled “Description”The width of the item.
Number (double)
PlacedItem.wrapInside
Section titled “PlacedItem.wrapInside”app.activeDocument.placedItems[index].wrapInside
Description
Section titled “Description”If true
, the text frame object should be wrapped inside this object.
Boolean
PlacedItem.wrapOffset
Section titled “PlacedItem.wrapOffset”app.activeDocument.placedItems[index].wrapOffset
Description
Section titled “Description”The offset to use when wrapping text around this object.
Number (double)
PlacedItem.wrapped
Section titled “PlacedItem.wrapped”app.activeDocument.placedItems[index].wrapped
Description
Section titled “Description”If true
, wrap text frame objects around this object (text frame must be above the object).
Boolean
PlacedItem.zOrderPosition
Section titled “PlacedItem.zOrderPosition”app.activeDocument.placedItems[index].zOrderPosition
Description
Section titled “Description”The position of this item within the stacking order of the group or layer (parent
) that contains the item.
Number; read-only.
Methods
Section titled “Methods”PlacedItem.duplicate()
Section titled “PlacedItem.duplicate()”app.activeDocument.placedItems[index].duplicate([relativeObject][, insertionLocation])
Description
Section titled “Description”Creates a duplicate of the selected object.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
relativeObject | Object, optional | Object to duplicate to |
insertionLocation | ElementPlacement, optional | Location to insert element |
Returns
Section titled “Returns”PlacedItem.embed()
Section titled “PlacedItem.embed()”app.activeDocument.placedItems[index].embed()
Description
Section titled “Description”Embeds this art in the document. Converts the art to art item objects as needed and deletes this object.
Returns
Section titled “Returns”Nothing.
PlacedItem.move()
Section titled “PlacedItem.move()”app.activeDocument.placedItems[index].move(relativeObject, insertionLocation)
Description
Section titled “Description”Moves the object.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
relativeObject | Object | Object to move element within |
insertionLocation | ElementPlacement, optional | Location to move element to |
Returns
Section titled “Returns”PlacedItem.relink()
Section titled “PlacedItem.relink()”app.activeDocument.placedItems[index].relink(linkFile)
Description
Section titled “Description”Relinks the art object with the file that defines its content.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
linkFile | File object | File to relink |
Returns
Section titled “Returns”Nothing.
PlacedItem.remove()
Section titled “PlacedItem.remove()”app.activeDocument.placedItems[index].remove()
Description
Section titled “Description”Deletes this object.
Returns
Section titled “Returns”Nothing.
PlacedItem.resize()
Section titled “PlacedItem.resize()”app.activeDocument.placedItems[index].resize( scaleX, scaleY [,changePositions] [,changeFillPatterns] [,changeFillGradients] [,changeStrokePattern] [,changeLineWidths] [,scaleAbout])
Description
Section titled “Description”Scales the art item where scaleX
is the horizontal scaling factor and scaleY
is the vertical scaling factor. 100.0 = 100%.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
scaleX | Number (double) | Horizontal scaling factor |
scaleY | Number (double) | Vertical scaling factor |
changePositions | Boolean, optional | Whether to effect art object positions and orientations |
changeFillPatterns | Boolean, optional | Whether to transform fill patterns |
changeFillGradients | Boolean, optional | Whether to transform fill gradients |
changeStrokePattern | Boolean, optional | Whether to transform stroke patterns |
changeLineWidths | Number (double), optional | The amount to scale line widths |
scaleAbout | Transformation, optional | The point to use as anchor, to transform about |
Returns
Section titled “Returns”Nothing.
PlacedItem.rotate()
Section titled “PlacedItem.rotate()”app.activeDocument.placedItems[index].rotate( angle [,changePositions] [,changeFillPatterns] [,changeFillGradients] [,changeStrokePattern] [,rotateAbout])
Description
Section titled “Description”Rotates the art item relative to the current rotation.
The object is rotated counter-clockwise if the angle
value is positive, clockwise if the value is negative.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
angle | Number (double) | The angle amount to rotate the element |
changePositions | Boolean, optional | Whether to effect art object positions and orientations |
changeFillPatterns | Boolean, optional | Whether to transform fill patterns |
changeFillGradients | Boolean, optional | Whether to transform fill gradients |
changeStrokePattern | Boolean, optional | Whether to transform stroke patterns |
rotateAbout | Transformation, optional | The point to use as anchor, to transform about |
Returns
Section titled “Returns”Nothing.
PlacedItem.trace
Section titled “PlacedItem.trace”app.activeDocument.placedItems[index].trace()
Description
Section titled “Description”Converts the raster art for this object to vector art, using default options.
Reorders the raster art into the source art of a plug-in group, and converts it into a group of filled and/or stroked paths that resemble the original image.
Creates and returns a PluginItem object that references a TracingObject object.
Returns
Section titled “Returns”PlacedItem.transform()
Section titled “PlacedItem.transform()”app.activeDocument.placedItems[index].transform( transformationMatrix [, changePositions] [, changeFillPatterns] [, changeFillGradients] [, changeStrokePattern] [, changeLineWidths] [, transformAbout])
Description
Section titled “Description”Transforms the art item by applying a transformation matrix.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
transformationMatrix | Matrix | Transformation matrix to apply |
changePositions | Boolean, optional | Whether to change Positions |
changeFillPatterns | Boolean, optional | Whether to change Fill Patterns |
changeFillGradients | Boolean, optional | Whether to change Fill Gradients |
changeStrokePattern | Boolean, optional | Whether to change Stroke Pattern |
changeLineWidths | Number (double), optional | The amount to scale line widths |
transformAbout | Transformation, optional | The point to use as anchor, to transform about |
Returns
Section titled “Returns”Nothing.
PlacedItem.translate()
Section titled “PlacedItem.translate()”app.activeDocument.placedItems[index].translate( [deltaX] [, deltaY] [, transformObjects] [, transformFillPatterns] [, transformFillGradients] [, transformStrokePatterns])
Description
Section titled “Description”Repositions the art item relative to the current position, where deltaX
is the horizontal offset and deltaY
is the vertical offset.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
deltaX | Number (double), optional | Horizontal offset |
deltaY | Number (double), optional | Vertical offset |
transformObjects | Boolean, optional | Whether to transform Objects |
transformFillPatterns | Boolean, optional | Whether to transform Fill Patterns |
transformFillGradients | Boolean, optional | Whether to transform Fill Gradients |
transformStrokePatterns | Boolean, optional | Whether to transform Stroke Patterns |
Returns
Section titled “Returns”Nothing.
PlacedItem.zOrder()
Section titled “PlacedItem.zOrder()”app.activeDocument.placedItems[index].zOrder(zOrderCmd)
Description
Section titled “Description”Arranges the art item’s position in the stacking order of the group or layer (parent) of this object.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
zOrderCmd | ZOrderMethod | Stacking order arrangement method |
Returns
Section titled “Returns”Nothing.
Example
Section titled “Example”Changing the selection state of placed items
Section titled “Changing the selection state of placed items”// Toggles the selection state of all placed items.if (app.documents.length > 0) { for (i = 0; i < app.activeDocument.placedItems.length; i++) { var placedArt = app.activeDocument.placedItems[i]; placedArt.selected = !(placedArt.selected); }}