Adobe InDesign CS5.5 (7.5) Object Model JS: PlaceGun

InDesign CS5.5

Class

PlaceGun

 Represents the place gun. Base Class: Preference

QuickLinks

abortPlaceGun, addEventListener, getElements, loadPlaceGun, removeEventListener, rotate, toSource, toSpecifier

Hierarchy

Document
Preference
PlaceGun
Button | EPS | EPSText | Event | EventListener | FormField | Graphic | GraphicLine | Group | Image | ImportedPage | MultiStateObject | MutationEvent | Oval | PDF | PICT | PageItem | Polygon | Rectangle | Snippet | SplineItem | TextFrame | WMF

Properties

PropertyTypeAccessDescription
buttonsButtons Button readonlyA collection of buttons.
epssEPSs EPS readonlyA collection of EPS files.
epstextsEPSTexts EPSText readonlyEPSTexts
eventListenersEventListeners EventListener readonlyA collection of event listeners.
eventsEvents Event readonlyA collection of events.
formFieldsFormFields FormField readonlyA collection of form fields.
graphicLinesGraphicLines GraphicLine readonlyA collection of graphic lines.
graphicsGraphics Graphic readonlyA collection of imported graphics in any graphic file format (vector, metafile, or bitmap).
groupsGroups Group readonlyA collection of groups.
imagesImages Image readonlyA collection of bitmap images in any bitmap file format (including TIFF, JPEG, or GIF).
importedPagesImportedPages ImportedPage readonlyImported InDesign pages.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
loadedbool readonlyWhether the place gun is currently loaded with content for placing.
multiStateObjectsMultiStateObjects MultiStateObject readonlyA collection of multi-state objects.
ovalsOvals Oval readonlyA collection of ellipses.
pageItemsPageItems PageItem readonlyThe page items collection, which can be used to process all page items in a container (such as a document, page, or group), regardless of type.
parentDocument readonlyThe parent of the PlaceGun (a Document).
pdfsPDFs PDF readonlyA collection of PDF files.
pictsPICTs PICT readonlyA collection of PICT graphics.
polygonsPolygons Polygon readonlyA collection of polygons.
propertiesObject r/wA property that allows setting of several properties at the same time.
rectanglesRectangles Rectangle readonlyA collection of rectangles.
snippetsSnippets Snippet readonlyA collection of IDML snippets.
splineItemsSplineItems SplineItem readonlyThe spline items collection.
textFramesTextFrames TextFrame readonlyA collection of text frames.
wmfsWMFs WMF readonlyA collection of WMF graphics.

Methods

Instances

void abortPlaceGun ()
Delete the contents of the place gun.

EventListener addEventListener (eventType: string, handler: varies[, captures: bool=false])
Adds an event listener.

ParameterTypeDescription
eventTypestringThe event type.
handlerFile
JavaScript Function
The event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

Array of PlaceGun getElements ()
Resolves the object specifier, creating an array of object references.

void loadPlaceGun (fileName: varies[, showingOptions: bool=false][, withProperties: Object])
Load the place gun with one or more files.

ParameterTypeDescription
fileNameArray of Files
File
One or more files to place. Can accept: File or Array of Files.
showingOptionsboolWhether to display the import options dialog (Optional) (default: false)
withPropertiesObjectInitial values for properties of the placed object(s) (Optional)

bool removeEventListener (eventType: string, handler: varies[, captures: bool=false])
Removes the event listener.

ParameterTypeDescription
eventTypestringThe registered event type.
handlerFile
JavaScript Function
The registered event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

void rotate ([direction: RotationDirection=RotationDirection.FORWARD])
Rotate the contents of the place gun.

ParameterTypeDescription
directionRotationDirection:
RotationDirection.FORWARD
RotationDirection.BACKWARD
Which direction to rotate the contents (Optional) (default: RotationDirection.FORWARD)

string toSource ()
Generates a string which, if executed, will return the PlaceGun.

string toSpecifier ()
Retrieves the object specifier.

Element of

Document.placeGuns

GraphicLine.parent

Oval.parent

Polygon.parent

Rectangle.parent

Snippet.parent

SplineItem.parent

TextFrame.parent

Return

Array of PlaceGun PlaceGun.getElements ()

Jongware, 28-Apr-2012 v3.0.3iContents :: Index