Guide

A guide.

Methods:

addEventListener, detach, duplicate, extractLabel, getElements, insertLabel, move, override, remove, removeEventListener, removeOverride, resolve, select, toSource, toSpecifier, transformValuesOf

Objects:

Boolean, EventListeners, Events, Graphic, Guide, GuideTypeOptions, HorizontalOrVertical, Layer, Movie, Number, Object, Page, PageItem, Sound, String, UIColors,

Property Listing

Property

Type

Access

Description

allowOverrides

Boolean

read/write

If true, the master page item can be overridden.

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

fitToPage

Boolean

read/write

If true, horizontal orientation guides stop at the edges of the specified page. If false, the guides extends across the width of the spread and into the pasteboard area.

guideColor

Array of 3 Reals (0 - 255)

UIColors

read/write

The color of the guide, specified either as an array of three doubles, each in the range 0 to 255 and representing R, G, and B values, or as a UI color. Can return: Array of 3 Reals (0 - 255) or UIColors enumerator.

guideType

GuideTypeOptions

GuideTypeOptions.LIQUID

GuideTypeOptions.RULER

read/write

The type of the guide.

guideZone

Number

String

read/write

The zone of the guide.

id

Number

readonly

The unique ID of the Guide.

index

Number

readonly

The index of the Guide within its containing object.

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

itemLayer

Layer

read/write

The layer that the Guide is on.

label

String

read/write

A property that can be set to any string.

location

Number

String

read/write

The location at which to place the guide relative to the current ruler zero point.

locked

Boolean

read/write

If true, the Guide is locked.

name

String

read/write

The name of the Guide; this is an alias to the Guide's label property.

orientation

HorizontalOrVertical

HorizontalOrVertical.HORIZONTAL

HorizontalOrVertical.VERTICAL

read/write

The orientation of the guide.

overridden

Boolean

readonly

If true, the object originated on a master spread and was overridden. If false, the object either originated on a master spread and was not overridden, or the object did not originate on a master page.

overriddenMasterPageItem

Graphic

Guide

Movie

PageItem

Sound

readonly

An object that originated on a master page and has been overridden. Can return: PageItem, Guide, Graphic, Movie or Sound.

parent

MasterSpread

Spread

readonly

The parent of the Guide (a Spread or MasterSpread).

parentPage

Page

readonly

The page on which this page item appears.

properties

Object

read/write

A property that allows setting of several properties at the same time.

viewThreshold

Number (range 5 - 4000)

read/write

The view magnification as a percentage below which guides are no longer displayed. (Range: 5.0 to 4000.0)

Constants/Events

Name

Type

Access

Description

AFTER_PLACE

String

readonly

Dispatched after a Guide is placed. This event bubbles. This event is not cancelable.

Method Listing

EventListener addEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Adds an event listener.

Parameter

Type

Description

eventType

String

The event type.

handler

File

JavaScriptFunction

The event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

undefined detach ()

Detaches an overridden master page item from the master page.

Guide duplicate ()

Duplicates the Guide.

String extractLabel (key:String)

Gets the label value associated with the specified key.

Parameter

Type

Description

key

String

The key.

Guide getElements ()

Resolves the object specifier, creating an array of object references.

undefined insertLabel (key:String, value:String)

Sets the label to the value associated with the specified key.

Parameter

Type

Description

key

String

The key.

value

String

The value.

undefined move (to:Array of Number String, by:Array of Number String)

Moves the guide to a new location. Note: Either the to or the by parameter is required; if both parameters are defined, only the to value is used.

Parameter

Type

Description

to

Array of Number

Array of String

The new location of the guide, in the format [x, y]. (Optional)

by

Array of Number

Array of String

The amount to move the guide relative to its current position, in the format [x, y]. (Optional)

Varies override (destinationPage:Page)

Overrides a master page item and places the item on the document page as a new object.

Parameter

Type

Description

destinationPage

Page

The document page that contains the master page item to override.

undefined remove ()

Deletes the Guide.

Boolean removeEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Removes the event listener.

Parameter

Type

Description

eventType

String

The registered event type.

handler

File

JavaScriptFunction

The registered event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

undefined removeOverride ()

Removes the override from a previously overridden master page item.

Varies resolve (location:Array of Varies AnchorPoint AnchorPoints 2 Reals BoundingBoxLimitss CoordinateSpacess Arrays of 2 Reals LongIntegers, in:CoordinateSpaces, [consideringRulerUnits:Boolean=Boolean])

Get the coordinates of the given location in the specified coordinate system.

Parameter

Type

Description

location

AnchorPoint

AnchorPoint.BOTTOM_CENTER_ANCHOR

AnchorPoint.BOTTOM_LEFT_ANCHOR

AnchorPoint.BOTTOM_RIGHT_ANCHOR

AnchorPoint.CENTER_ANCHOR

AnchorPoint.LEFT_CENTER_ANCHOR

AnchorPoint.RIGHT_CENTER_ANCHOR

AnchorPoint.TOP_CENTER_ANCHOR

AnchorPoint.TOP_LEFT_ANCHOR

AnchorPoint.TOP_RIGHT_ANCHOR

AnchorPoints AnchorPoint

Array of 2 Reals

BoundingBoxLimitss BoundingBoxLimits

CoordinateSpacess CoordinateSpaces

Array of Arrays of 2 Reals

LongIntegers

The location requested. Can accept: Array of 2 Reals, AnchorPoint enumerator or Array of Arrays of 2 Reals, CoordinateSpaces enumerators, AnchorPoint enumerators, BoundingBoxLimits enumerators or Long Integers.

in

CoordinateSpaces

CoordinateSpaces.INNER_COORDINATES

CoordinateSpaces.PAGE_COORDINATES

CoordinateSpaces.PARENT_COORDINATES

CoordinateSpaces.PASTEBOARD_COORDINATES

CoordinateSpaces.SPREAD_COORDINATES

The coordinate space to use.

consideringRulerUnits

Boolean

If true then a ruler location is interpreted using ruler units rather than points. The default value is false. This parameter has no effect unless the reference point is specified relative to a page. (Optional)

(default: false)

undefined select ([existingSelection:SelectionOptions=SelectionOptions])

Selects the object.

Parameter

Type

Description

existingSelection

SelectionOptions

SelectionOptions.ADD_TO

SelectionOptions.REMOVE_FROM

SelectionOptions.REPLACE_WITH

SelectionOptions.SET_KEY

The selection status of the Guide in relation to previously selected objects. (Optional)

(default: SelectionOptions.REPLACE_WITH)

String toSource ()

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

String toSpecifier ()

Retrieves the object specifier.

TransformationMatrix transformValuesOf (in:CoordinateSpaces)

Get the transformation values of the page item.

Parameter

Type

Description

in

CoordinateSpaces

CoordinateSpaces.INNER_COORDINATES

CoordinateSpaces.PAGE_COORDINATES

CoordinateSpaces.PARENT_COORDINATES

CoordinateSpaces.PASTEBOARD_COORDINATES

CoordinateSpaces.SPREAD_COORDINATES

The coordinate space to use

Object of

FormField.overriddenMasterPageItem

Button.overriddenMasterPageItem

MultiStateObject.overriddenMasterPageItem

CheckBox.overriddenMasterPageItem

ComboBox.overriddenMasterPageItem

ListBox.overriddenMasterPageItem

RadioButton.overriddenMasterPageItem

TextBox.overriddenMasterPageItem

SignatureField.overriddenMasterPageItem

Movie.overriddenMasterPageItem

Sound.overriddenMasterPageItem

PageItem.overriddenMasterPageItem

Oval.overriddenMasterPageItem

Rectangle.overriddenMasterPageItem

GraphicLine.overriddenMasterPageItem

Polygon.overriddenMasterPageItem

Group.overriddenMasterPageItem

Image.overriddenMasterPageItem

EPS.overriddenMasterPageItem

PDF.overriddenMasterPageItem

WMF.overriddenMasterPageItem

PICT.overriddenMasterPageItem

Graphic.overriddenMasterPageItem

Guide.overriddenMasterPageItem

SplineItem.overriddenMasterPageItem

EPSText.overriddenMasterPageItem

ImportedPage.overriddenMasterPageItem

SVG.overriddenMasterPageItem

MediaItem.overriddenMasterPageItem

HtmlItem.overriddenMasterPageItem

TextFrame.overriddenMasterPageItem

EndnoteTextFrame.overriddenMasterPageItem

Event.parent

EventListener.parent

MutationEvent.parent

Return

Guides.add()

Guide.duplicate()

Guide.getElements()

Guides.anyItem()

Guides.everyItem()

Guides.nextItem()

Guides.previousItem()

Guides.itemByID()

Guides.item()

Guides.[]()

Guides.itemByName()

Guides.itemByRange()

Guides.firstItem()

Guides.lastItem()

Guides.middleItem()