Adobe InDesign CS6 (8.0) Object Model JS: PlaceGun

InDesign CS6

Class

PlaceGun

 Represents the place gun. Base Class: Preference

QuickLinks

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

Hierarchy

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

Properties

PropertyTypeAccessDescription
buttonsButtons readonlyA collection of buttons.
checkBoxesCheckBoxes readonlyA collection of checkboxes.
comboBoxesComboBoxes readonlyA collection of comboboxes.
epssEPSs readonlyA collection of EPS files.
epstextsEPSTexts readonlyEPSTexts
eventListenersEventListeners readonlyA collection of event listeners.
eventsEvents readonlyA collection of events.
formFieldsFormFields readonlyA collection of form fields.
graphicLinesGraphicLines readonlyA collection of graphic lines.
graphicsGraphics readonlyA collection of imported graphics in any graphic file format (vector, metafile, or bitmap).
groupsGroups readonlyA collection of groups.
imagesImages readonlyA collection of bitmap images in any bitmap file format (including TIFF, JPEG, or GIF).
importedPagesImportedPages readonlyImported InDesign pages.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
listBoxesListBoxes readonlyA collection of listboxes.
loadedbool readonlyWhether the place gun is currently loaded with content for placing.
multiStateObjectsMultiStateObjects readonlyA collection of multi-state objects.
ovalsOvals readonlyA collection of ellipses.
pageItemsPageItems 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 readonlyA collection of PDF files.
pictsPICTs readonlyA collection of PICT graphics.
polygonsPolygons readonlyA collection of polygons.
propertiesObject r/wA property that allows setting of several properties at the same time.
radioButtonsRadioButtons readonlyA collection of radio buttons.
rectanglesRectangles readonlyA collection of rectangles.
signatureFieldsSignatureFields readonlyA collection of signature fields.
snippetsSnippets readonlyA collection of IDML snippets.
splineItemsSplineItems readonlyThe spline items collection.
textBoxesTextBoxes readonlyA collection of text boxes.
textFramesTextFrames readonlyA collection of text frames.
wmfsWMFs 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.3hContents :: Index