Skip to content

GraphItem

app.activeDocument.graphItems[index]

Any graph artwork object. See example Rotating graph items.


app.activeDocument.graphItems[index].artworkKnockout

Is this object used to create a knockout, and if so, what kind of knockout. You cannot set this value to KnockoutState.Unknown.

KnockoutState


app.activeDocument.graphItems[index].blendingMode

The mode used when compositing an object.

BlendModes


app.activeDocument.graphItems[index].contentVariable

The content variable bound to the graph item.

It is not necessary to set the type of the contentVariable before binding. Illustrator automatically set the type to GRAPH.

Variable


app.activeDocument.graphItems[index].controlBounds

The content variable bound to the graph item.

The bounds of the object including stroke width and controls.

Array of 4 numbers; read-only.


app.activeDocument.graphItems[index].editable

If true, this graph item is editable.

Boolean; read-only.


app.activeDocument.graphItems[index].geometricBounds

The bounds of the object excluding stroke width.

Array of 4 numbers; read-only.


app.activeDocument.graphItems[index].height

The height of the graph item.

Number (double); read-only.


app.activeDocument.graphItems[index].hidden

If true, this graph item is hidden.

Boolean.


app.activeDocument.graphItems[index].isIsolated

If true, this object is isolated.

Boolean.


app.activeDocument.graphItems[index].layer

The layer to which this graph item belongs.

Layer; read-only.


app.activeDocument.graphItems[index].left

The offset (in points) of the left side of the graph item from the left side of the page.

Number.


app.activeDocument.graphItems[index].locked

If true, this graph item is locked.

Boolean.


app.activeDocument.graphItems[index].name

The name of this graph item.

String.


app.activeDocument.graphItems[index].note

The note assigned to this item.

String.


app.activeDocument.graphItems[index].opacity

The opacity of the object; the value is between 0.0 and 100.0.

Number (double)


app.activeDocument.graphItems[index].parent

The parent of this object.

Layer or GroupItem


app.activeDocument.graphItems[index].position

The position (in points) of the top left corner of the graphItem object in the format [x, y]. Does not include stroke weight.

Array of 2 numbers.


app.activeDocument.graphItems[index].selected

If true, this object is selected.

Boolean.


app.activeDocument.graphItems[index].sliced

If true, the graph item is sliced.

Default: false.

Boolean.


app.activeDocument.graphItems[index].tags

The tags contained in this graph item.

Tags; read-only.


app.activeDocument.graphItems[index].top

The offset (in points) of the top of the graph item from the bottom of the page.

Number (double).


app.activeDocument.graphItems[index].typename

The type of the graph item.

String; read-only.


app.activeDocument.graphItems[index].uRL

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

String.


app.activeDocument.graphItems[index].visibilityVariable

The visibility variable bound to the graph item.

It is not necessary to set the type of the visibilityVariable before binding. Illustrator automatically set the type to VISIBILITY.

Variable


app.activeDocument.graphItems[index].visibleBounds

The visible bounds of the graph item including stroke width.

Array of 4 numbers; read-only.


app.activeDocument.graphItems[index].width

The width of the graph item.

Range: 0.0 to 16348.0.

Number (double).


app.activeDocument.graphItems[index].wrapInside

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

Boolean.


app.activeDocument.graphItems[index].wrapOffset

The offset to use when wrapping text around this object.

Number (double).


app.activeDocument.graphItems[index].wrapped

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

Boolean.


app.activeDocument.graphItems[index].zOrderPosition

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

Number (long).


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

Creates a duplicate of the selected object.

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

GraphItem


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

Moves the object.

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

GraphItem


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

Deletes this object.

Nothing.


app.activeDocument.graphItems[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.graphItems[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.graphItems[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.graphItems[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.graphItems[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.