## Manipulating Objects

copyObject(...)
  `copyObject(["name"]) -> string`

  copies the selected Object to the clipboard.

duplicateObject(...)
  `duplicateObject(["name"]) -> string`

  creates a Duplicate of the selected Object (or Selection Group).

groupObjects(...)
  `groupObjects(list)`

  Groups the objects named in "list" together. "list" must contain the names of the objects to be grouped. If "list" is not given the currently selected items are used.

isLocked(...)
  `isLocked(["name"]) -> bool`

  Returns true if is the object "name" locked. If "name" is not given the currently selected item is used.

lockObject(...)
  `lockObject(["name"]) -> bool`

  Locks the object "name" if it's unlocked or unlock it if it's locked. If "name" is not given the currently selected item is used. Returns true if locked.

moveObject(...)
  `moveObject(dx, dy [, "name"])`

  Moves the object "name" by dx and dy relative to its current position. The distances are expressed in the current measurement unit of the document (see UNIT constants). If "name" is not given the currently selected item is used. If the object "name" belongs to a group, the whole group is moved.

  If what you wish to do is to move an object to a different page or layer, it may be more efficient to do the sequence copyObject(...), followed by pasteObject(...), and then finally deleteObject(...) to delete the original.

moveObjectAbs(...)
  `moveObjectAbs(x, y [, "name"])`

  Moves the object "name" to a new location. The coordinates are expressed in the current measurement unit of the document (see UNIT constants). If "name" is not given the currently selected item is used. If the object "name" belongs to a group, the whole group is moved.

pasteObject(...)
  `pasteObject(["name"]) -> string`

  pastes an Object from the clipboard. This will be used only or most sensibly following copyObject(...), since otherwise there will likely be nothing in the clipboard to paste.

rotateObject(...)
  `rotateObject(rot [, "name"])`

  Rotates the object "name" by "rot" degrees relatively. The object is rotated by the vertex that is currently selected as the rotation point - by default, the top left vertext at zero rotation. Positive values mean counter clockwise rotation when the default rotation point is used. If "name" is not given the currently selected item is used.

rotateObjectAbs(...)
  `rotateObjectAbs(rot [, "name"])`

  Sets the rotation of the object "name" to "rot". Positive values mean counter clockwise rotation. If "name" is not given the currently selected item is used.

scaleGroup(...)
  `scaleGroup(factor [,"name"])`

  Scales the group the object "name" belongs to. Values greater than 1 enlarge the group, values smaller than 1 make the group smaller e.g a value of 0.5 scales the group to 50 % of its original size, a value of 1.5 scales the group to 150 % of its original size. The value for "factor" must be greater than 0. If "name" is not given the currently selected item is used.

  May raise ValueError if an invalid scale factor is passed.

setScaleImageToFrame(...)
  `setScaleImageToFrame(scaletoframe, proportional=None, name=<selection>)`

  Sets the scale to frame on the selected or specified image frame to `scaletoframe'. If `proportional' is specified, set fixed aspect ratio scaling to `proportional'. Both `scaletoframe' and `proportional' are boolean.

  May raise WrongFrameTypeError.

setStyle(...)
  `setStyle("style" [, "name"])`

  Apply the named "style" to the object named "name". If object name is given, style is applied to the current text selection in object "name". If no object name is given, style is applied on selected object.

sizeObject(...)
  `sizeObject(width, height [, "name"])`

  Resizes the object "name" to the given width and height. If "name" is not given the currently selected item is used.

unGroupObject(...)
  `unGroupObjects("name")`

  Destructs the group the object "name" belongs to.If "name" is not given the currently selected item is used.

textFlowMode(...)
  `textFlowMode("name" [, state])`

  Enables/disables "Text Flows Around Frame" feature for object "name". Called with parameters string name and optional int "state" (0 <= state <= 3). Setting "state" to 0 will disable text flow. Setting "state" to 1 will make text flow around object frame. Setting "state" to 2 will make text flow around bounding box. Setting "state" to 3 will make text flow around contour line. If "state" is not passed, text flow is toggled.