Skip to content

PlacedItem

app.activeDocument.placedItems[index]

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.


app.activeDocument.placedItems[index].artworkKnockout

Is this object used to create a knockout, and if so, what kind of knockout.

KnockoutState


app.activeDocument.placedItems[index].blendingMode

The blend mode used when compositing an object.

BlendModes


app.activeDocument.placedItems[index].boundingBox

The dimensions of the placed art item regardless of transformations.

Array of 4 numbers


app.activeDocument.placedItems[index].contentVariable

The content variable bound to the item.

Variable


app.activeDocument.placedItems[index].controlBounds

The bounds of the object including stroke width and controls.

Array of 4 numbers; read-only.


app.activeDocument.placedItems[index].editable

If true, this item is editable.

Boolean; read-only.


app.activeDocument.placedItems[index].file

The file containing the artwork.

File object; read-only.


app.activeDocument.placedItems[index].geometricBounds

The bounds of the object excluding stroke width.

Array of 4 numbers; read-only.


app.activeDocument.placedItems[index].height

The height of the group item.

Number (double)


app.activeDocument.placedItems[index].hidden

If true, this item is hidden.

Boolean


app.activeDocument.placedItems[index].isIsolated

If true, this object is isolated.

Boolean


app.activeDocument.placedItems[index].layer

The layer to which this item belongs.

Layer; read-only.


app.activeDocument.placedItems[index].left

The position of the left side of the item (in points, measured from the left side of the page).

Number (double)


app.activeDocument.placedItems[index].locked

If true, this item is locked.

Boolean


app.activeDocument.placedItems[index].matrix

The transformation matrix of the placed artwork.

Matrix


app.activeDocument.placedItems[index].name

The name of this item.

String


app.activeDocument.placedItems[index].note

The note assigned to this item.

String


app.activeDocument.placedItems[index].opacity

The opacity of the object.

Range: 0.0 to 100.0

Number (double)


app.activeDocument.placedItems[index].parent

The parent of this object.

Layer or GroupItem


app.activeDocument.placedItems[index].position

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.


app.activeDocument.placedItems[index].selected

If true, this item is selected.

Boolean


app.activeDocument.placedItems[index].sliced

If true, the item sliced.

Default: false

Boolean


app.activeDocument.placedItems[index].tags

The tags contained in this item.

Tags; read-only.


app.activeDocument.placedItems[index].top

The position of the top of the item (in points, measured from the bottom of the page).

Number (double)


app.activeDocument.placedItems[index].typename

The class name of the referenced object.

String; read-only.


app.activeDocument.placedItems[index].uRL

The value of the Adobe URL tag assigned to this item.

String


app.activeDocument.placedItems[index].visibilityVariable

The visibility variable bound to the item.

Variable


app.activeDocument.placedItems[index].visibleBounds

The visible bounds of the item including stroke width.

Array of 4 numbers; read-only.


app.activeDocument.placedItems[index].width

The width of the item.

Number (double)


app.activeDocument.placedItems[index].wrapInside

If true, the text frame object should be wrapped inside this object.

Boolean


app.activeDocument.placedItems[index].wrapOffset

The offset to use when wrapping text around this object.

Number (double)


app.activeDocument.placedItems[index].wrapped

If true, wrap text frame objects around this object (text frame must be above the object).

Boolean


app.activeDocument.placedItems[index].zOrderPosition

The position of this item within the stacking order of the group or layer (parent) that contains the item.

Number; read-only.


app.activeDocument.placedItems[index].duplicate([relativeObject][, insertionLocation])

Creates a duplicate of the selected object.

ParameterTypeDescription
relativeObjectObject, optionalObject to duplicate to
insertionLocationElementPlacement, optionalLocation to insert element

PlacedItem


app.activeDocument.placedItems[index].embed()

Embeds this art in the document. Converts the art to art item objects as needed and deletes this object.

Nothing.


app.activeDocument.placedItems[index].move(relativeObject, insertionLocation)

Moves the object.

ParameterTypeDescription
relativeObjectObjectObject to move element within
insertionLocationElementPlacement, optionalLocation to move element to

PlacedItem


app.activeDocument.placedItems[index].relink(linkFile)

Relinks the art object with the file that defines its content.

ParameterTypeDescription
linkFileFile objectFile to relink

Nothing.


app.activeDocument.placedItems[index].remove()

Deletes this object.

Nothing.


app.activeDocument.placedItems[index].resize(
scaleX,
scaleY
[,changePositions]
[,changeFillPatterns]
[,changeFillGradients]
[,changeStrokePattern]
[,changeLineWidths]
[,scaleAbout]
)

Scales the art item where scaleX is the horizontal scaling factor and scaleY is the vertical scaling factor. 100.0 = 100%.

ParameterTypeDescription
scaleXNumber (double)Horizontal scaling factor
scaleYNumber (double)Vertical scaling factor
changePositionsBoolean, optionalWhether to effect art object positions and orientations
changeFillPatternsBoolean, optionalWhether to transform fill patterns
changeFillGradientsBoolean, optionalWhether to transform fill gradients
changeStrokePatternBoolean, optionalWhether to transform stroke patterns
changeLineWidthsNumber (double), optionalThe amount to scale line widths
scaleAboutTransformation, optionalThe point to use as anchor, to transform about

Nothing.


app.activeDocument.placedItems[index].rotate(
angle
[,changePositions]
[,changeFillPatterns]
[,changeFillGradients]
[,changeStrokePattern]
[,rotateAbout]
)

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.

ParameterTypeDescription
angleNumber (double)The angle amount to rotate the element
changePositionsBoolean, optionalWhether to effect art object positions and orientations
changeFillPatternsBoolean, optionalWhether to transform fill patterns
changeFillGradientsBoolean, optionalWhether to transform fill gradients
changeStrokePatternBoolean, optionalWhether to transform stroke patterns
rotateAboutTransformation, optionalThe point to use as anchor, to transform about

Nothing.


app.activeDocument.placedItems[index].trace()

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.

PluginItem


app.activeDocument.placedItems[index].transform(
transformationMatrix
[, changePositions]
[, changeFillPatterns]
[, changeFillGradients]
[, changeStrokePattern]
[, changeLineWidths]
[, transformAbout]
)

Transforms the art item by applying a transformation matrix.

ParameterTypeDescription
transformationMatrixMatrixTransformation matrix to apply
changePositionsBoolean, optionalWhether to change Positions
changeFillPatternsBoolean, optionalWhether to change Fill Patterns
changeFillGradientsBoolean, optionalWhether to change Fill Gradients
changeStrokePatternBoolean, optionalWhether to change Stroke Pattern
changeLineWidthsNumber (double), optionalThe amount to scale line widths
transformAboutTransformation, optionalThe point to use as anchor, to transform about

Nothing.


app.activeDocument.placedItems[index].translate(
[deltaX]
[, deltaY]
[, transformObjects]
[, transformFillPatterns]
[, transformFillGradients]
[, transformStrokePatterns]
)

Repositions the art item relative to the current position, where deltaX is the horizontal offset and deltaY is the vertical offset.

ParameterTypeDescription
deltaXNumber (double), optionalHorizontal offset
deltaYNumber (double), optionalVertical offset
transformObjectsBoolean, optionalWhether to transform Objects
transformFillPatternsBoolean, optionalWhether to transform Fill Patterns
transformFillGradientsBoolean, optionalWhether to transform Fill Gradients
transformStrokePatternsBoolean, optionalWhether to transform Stroke Patterns

Nothing.


app.activeDocument.placedItems[index].zOrder(zOrderCmd)

Arranges the art item’s position in the stacking order of the group or layer (parent) of this object.

ParameterTypeDescription
zOrderCmdZOrderMethodStacking order arrangement method

Nothing.


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);
}
}