Jump to content
Sam Jones

Bounding Box of a Group

Recommended Posts

Is there a way to get the bounding box (x1,y1,x2,y2) of a group.  I want to create a group and then get its bounding box.  Selecting the objects and then grouping them does not yield a handle to the group



GrpObj := LNewObj:

{GrpObj returns nil here}


I would like to get a handle to the group and then get its bounding box, but that doesn't seem to work.

Share this post

Link to post

It seems to work here.


Procedure GroupBB;

Var	X1,Y1,X2,Y2:Real;

	AlrtDialog(Concat(GetTypeN(FSActLayer),' - ',X1,' - ',Y1,' - ',X2,' - ',Y2));



Share this post

Link to post

Probable that Group does not change LNewObject.  Try the Waldo Method.



Insert Locus, LNewObj,GetPrev(LNewObject), Delete Locus.


I think this was originally disclosed by @Gerard Jonker back around 2002.

Share this post

Link to post


   A new Group is always created on top of the stacking order, so if you are on a design or sheet layer, LActLayer will return a handle to a new Group. If you are drawing inside a container, you can use the Waldo method that Pat mentioned. With the handle you can then get the Group's BBox.





Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

  • Create New...