PGetSelectIDList

Gets the number of objects currently selected and lists each object ID, group ID, drawing number, type, coordinates, and whether the object is linked and transformed. This query does not return information about groups; use PGetSelectIDListTop instead.


Query results

PGetSelectIDList is a subclass of PListQuery. This query returns a list of object information. For each object, it returns:

unsigned long nObjectID;

Unique ID of object
unsigned long nMaskID;
Unique ID of mask object if nObjectID is masked
0 if nObjectID is not masked
unsigned long nGroupID;
Group ID if object is part of a group
0 if object is not part of a group
short nDrawNumber;
Drawing-order number of object
-2 for inline graphic
short cTypeOfObject;
0 reserved (currently not used)
1 for text block
2 reserved (currently not used)
3 for line
4 for box
5 for oval
6 for TIFF or bitmap image
7 reserved (currently not used)
8 for PICT
9 for PICT (same as 8)
10 for metafile
11 for EPS
12 for polygon
13 reserved (currently not used)
PMBool bTransformed;
false if object has not been transformed
true if object has been transformed
PMBool bLinked;
false if object is not linked to an external file
true if object is linked to an external file
long xLeftOrStart;
x coordinate of left-top handle of object, or starting point of line in twips
long yTopOrStart;
y coordinate of left-top handle of object, or starting point of line in twips
long xRightOrEnd;
x coordinate of right-bottom handle of object, or end point of line in twips
long yBottomOrEnd;
y coordinate of right-bottom handle of object, or end point of line in twips
long xRightOrStart;
x coordinate of right-top handle of object, or starting point of line in twips
long yTopOrStart2;
y coordinate of right-top handle of object, or starting point of line in twips
long xLeftOrEnd;
x coordinate of bottom-left handle of object, or end point of line in twips
long yBotOrEnd2;
y coordinate of bottom-left handle of object, or end point of line in twips
Layout view only. The PGetSelectIDList query works only in layout view.

Coordinates for transformed objects. If the selected object was skewed, rotated, or reflected, the coordinate pairs (xLeftOrStart, yTopOrStart), (xRightOrStart, yTopOrStart2), (xLeftOrEnd, yBotOrEnd2), and (xRightOrEnd, yBottomOrEnd) correspond to the original left-top, right-top, left-bottom, and right-bottom handles, correspond to the original left-top and right-bottom handles, but indicate their new locations.

Coordinates for lines. PageMaker returns the corners of the bounding box for most objects, but returns the starting and end points for lines. The first coordinate pair (xLeftOrStart, yTopOrStart) corresponds to the starting point of the line. The second coordinate pair (xRightOrEnd, yBottomOrEnd) corresponds to the end point of the line. The third and fourth coordinate pairs are irrel evant because they duplicate the values of the first two coordinate pairs.

Where the weight of a line lies in relation to the end points depends upon the type of line and whether the user has flipped the weight of the line with the pointer tool to the other side of the line (horizontal and vertical lines only). The illustration above shows the default locations: Horizontal lines hang down from the end points; vertical lines hang to the right of the end points; diagonal lines are centered.

This query does not return fields that specify:

Example. The following example creates a new publication, draws and styles two boxes (of different sizes), skews the second box, and selects all objects on the page. It queries for the number of objects currently selected and each object ID, drawing number, type, and coordinates. Notice that although these two objects are a different size and shape, the left-top and right-bottom handles overlap, resulting in the same return values. To get more detailed information about transformed objects, use the PGetTransform query.

PNew();
PBox(0, 0, 3 * kTwipsPerInch, kTwipsPerInch);
PLineStyle(kLineOnePoint);
PFillStyle(kFillNone);
PBox(0, 0, 2 * kTwipsPerInch, kTwipsPerInch);
PLineStyle(kLineNone);
PFillStyle(kFillSolid);
PSkew(kEdgeLeftTop, -450);
PSelectAll();
PGetSelectIDList id();
id.Count();     // expected: 2
id.nObjectID;   // 1  (first box)
id.nMaskID;     // 0
id.nGroupID;    // 0
id.nDrawNumber; // 1
...
id++;
...
id.xLeftOrStart; // ... (second box)


See also

The PGetObjectIDList, PGetObjectList, and PGetObjectLoc queries


Copyright © 1996, Adobe Systems Incorporated. All rights reserved.

Comments or suggestions? Contact Adobe Developer Support