PGetGroupList

Gets the number of objects in the specified group and, for each object, gets its object ID, group ID, drawing number, type, whether the object is linked and has been transformed, and its coordinates.


Query constructor

PGetGroupList(unsigned long nGroupID);

unsigned long nGroupID;

Unique ID of group.


Query results

PGetGroupList is a subclass of PListQuery, which returns a list of information. Be sure that PListQuery::Count() > 0 before referencing these fields.

For each object, it returns the following fields:

unsigned long nObjectID;

Unique ID of object
unsigned long nMaskID;
Unique ID of mask object if nObjectID is masked (null if nObjectID is not masked)
unsigned long nGroupID;
Unique ID of group
short nDrawNumber;
Drawing-order number of object
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)
14 for group (no group objects within a group)
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 bottom-right handle of object or end point of line in twips
long yBottomOrEnd;
y coordinate of bottom-right 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
Coordinates for transformed objects. If the object was skewed, rotated, or reflected, the coordinate pairs (xLeftOrStart, yTopOrStart), (xRightOrStart, yTopOrStart2), (xLeftOrEnd, yBotOrEnd2), and (xRightOrEnd, yBottomOrEnd) indicate the current locations of the handles that originally were in the left-top, right-top, left-bottom, and right-bottom positions.

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.

Example. The following example creates a new publication, draws and styles two boxes (of different sizes), and skews the second box. It selects both boxes, groups them, and then queries for information about the group. Notice that although the two objects are different sizes and shapes, their left-top and right-bottom handles overlap, resulting in the same return values. To get more detailed information about transformed objects, use the GetTransform query. To get more detailed information about linked objects, use the GetLinkInfo and GetLinks query. Notice also the nDrawNumber for this group is 1 and the nDrawNumber for the boxes are 2 and 3 respectively.

PNew();
PBox(0, 0, 2 * kTwipsPerInch, kTwipsPerInch);
PLineStyle(kLineOnePoint);
PFillStyle(kFillNone);
PBox(0, 0, 2 * kTwipsPerInch, kTwipsPerInch);
PLineStyle(kLineNone);
PFillStyle(kLineSolid);
PSkew(kEdgeLeftTop, -45);
PSelectAll();
PGroup();
PGetGroupList(3);
// expected reply: 2,1,3,2,4,0,0,0,0,3,1,0,0,1,2,2,3,3,4,1,0,0,0,3,1,2,0,1,1


See also

The PGetObjectLoc, PGetSelectIDList, PGetSelectIDListTop, PGetTransform, PGetLineStyle, PGetObjectIDListTop, and PGetSelectIDListTop queries


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

Comments or suggestions? Contact Adobe Developer Support