Polygons

A collection of polygons.

Methods:

add, anyItem, count, everyItem, firstItem, item, itemByID, itemByName, itemByRange, lastItem, middleItem, nextItem, previousItem, toSource

Property Listing

Property

Type

Access

Description

length

Number

readonly

The number of objects in the collection.

Method Listing

Polygon add (layer:Layer, numberOfSides:Number, insetPercentage:Number, [at:LocationOptions=LocationOptions], reference:Varies Document MasterSpread Page Spread Layer, withProperties:Object)

Create a new Polygon

Parameter

Type

Description

layer

Layer

The layer on which to create the Polygon (Optional)

numberOfSides

Number (range 3 - 100)

The number of sides for the polygon (Optional)

insetPercentage

Number (range 0 - 100)

The star inset percentage for the polygon (Optional)

at

LocationOptions

LocationOptions.AFTER

LocationOptions.AT_BEGINNING

LocationOptions.AT_END

LocationOptions.BEFORE

LocationOptions.UNKNOWN

Location (Optional)

(default: LocationOptions.UNKNOWN)

reference

Document

MasterSpread

Page

Spread

Layer

Before/after this Polygon or at the beginning/end of this Document, Spread, Master Spread, Page or Layer. Can accept: Document, Spread, MasterSpread, Page or Layer. (Optional)

withProperties

Object

Initial values for properties of the new Polygon (Optional)

Polygon anyItem ()

Returns any Polygon in the collection.

Number count ()

Displays the number of elements in the Polygon.

Polygon everyItem ()

Returns every Polygon in the collection.

Polygon firstItem ()

Returns the first Polygon in the collection.

Polygon item (index:Varies Long String)

Returns the Polygon with the specified index or name.

Parameter

Type

Description

index

Long

String

The index or name. Can accept: Long or String.

Polygon itemByID (id:Number)

Returns the Polygon with the specified ID.

Parameter

Type

Description

id

Number

The ID.

Polygon itemByName (name:String)

Returns the Polygon with the specified name.

Parameter

Type

Description

name

String

The name.

Polygon itemByRange (from:Varies Long Polygon String, to:Varies Long Polygon String)

Returns the Polygons within the specified range.

Parameter

Type

Description

from

Long

Polygon

String

The Polygon, index, or name at the beginning of the range. Can accept: Polygon, Long or String.

to

Long

Polygon

String

The Polygon, index, or name at the end of the range. Can accept: Polygon, Long or String.

Polygon lastItem ()

Returns the last Polygon in the collection.

Polygon middleItem ()

Returns the middle Polygon in the collection.

Polygon nextItem (obj:Polygon)

Returns the Polygon whose index follows the specified Polygon in the collection.

Parameter

Type

Description

obj

Polygon

The Polygon whose index comes before the desired Polygon.

Polygon previousItem (obj:Polygon)

Returns the Polygon with the index previous to the specified index.

Parameter

Type

Description

obj

Polygon

The index of the Polygon that follows the desired Polygon.

String toSource ()

Generates a string which, if executed, will return the Polygon.

Object of

Document.polygons

Button.polygons

State.polygons

Layer.polygons

Spread.polygons

Page.polygons

MasterSpread.polygons

PageItem.polygons

Oval.polygons

Rectangle.polygons

GraphicLine.polygons

Polygon.polygons

Group.polygons

Cell.polygons

Table.polygons

Text.polygons

Character.polygons

Word.polygons

Line.polygons

TextColumn.polygons

Paragraph.polygons

TextStyleRange.polygons

InsertionPoint.polygons

TextFrame.polygons

Story.polygons

Footnote.polygons