GetObject Object Query Command

GETOBJECT Object Queries

Gets the object ID, rotation status and the status of various flags for an object or objects.

getobject [TYPE type] [PAGENUMBER page] [ROTATION stem] [ABOUT stem] [CONSTRAIN string] [PRINT string] [LOCK flag] [BOUNDINGBOX stem] [DOCUMENT name | WINDOW name | OBJECTID number]

TYPE/i Gets the object type.

PAGENUMBER/s Gets the full page number path.

ROTATION/a Gets the rotation.

ABOUT/a Gets the rotation point.

CONSTRAIN/s Gets the proportional scale flag state.

PRINT/s Gets the print flag state.

LOCK Gets the object lock flag state.

BOUNDINGBOX Gets the bounding box of the object(s).

DOCUMENT/s The document name. Default=current.

WINDOW/s The window name. Default=current.

OBJECTID/i The object number. Default=current.

Results:

The object ID is returned to RESULT.

TYPE/i The object type number:

2 Drawing

3 Group

4 Compound

5 Box

6 Line

7 Ellipse

8 Grid

9 Polygon

10 Path

11 Text Frame

12 Picture

13 EPS

14 Frameless Text

?? Multiple Select (not assigned)

ROTATION stem

slant/d The slant angle.

twist/d The twist angle.

ABOUT stem

mode/k The rotation point: POINT | CENTER.

x/d The point's horizontal coordinate.

y/d The point's vertical coordinate.

CONSTRAIN string/k The constrain flag: ON | OFF.

PRINT string/k The print flag: ON | OFF.

LOCK/k The lock flag: ON | OFF.

BOUNDINGBOX stem

left/d The left coordinate.

top/d The top coordinate.

right/d The right coordinate.

bottom/d The bottom coordinate.

Notes:

BOUNDINGBOX: the bounding box includes the stroke thickness of objects, and is expanded to contain rotated objects.

Examples:

getobject constrain cflag print pflag
say 'The proportional scale flag is '||cflag
say 'The print flag is '||pflag

 

GetObject  Command Definition  url:PGScmd/getobject
  created:2006-03-30 22:20:07   last updated:2006-03-30 22:20:07
  Copyright © 1985-2017 GrasshopperLLC. All Rights Reserved.

User Contributed Comments For GetObject
Dan Kilroy wrote...2006-05-03 19:26:30

Script command submitted from PageStream internal documentation. Needs to be checked and merged with the command documentation above.

Gets the {...} .

objectid = GetObject ([TYPE &type] [PAGENUMBER &pagepath] [ROTATION &rotation/.SLANT.TWIST] [ABOUT &mode/.MODE<POINT|CENTER>.X.Y] [CONSTRAIN &flag<ON|OFF>] [PRINT &flag<ON|OFF>] [LOCK &flag<ON|OFF>] PGS 5.0.3.4:[DIMENSIONS &dim/.LEFT.TOP.RIGHT.BOTTOM] [BOUNDINGBOX &bbox/.LEFT.TOP.RIGHT.BOTTOM] [DOCUMENT document | WINDOW document-window | OBJECTID objectid])


Parameters:
DIMENSIONS added in 5.0.3.4.


Results:


Notes:


See Also:


Examples:
Python:


ARexx:

Applescript:

User Contributed Comments For GetObject