# Finding the location of a group

**URL:** <https://forums.sketchup.com/t/finding-the-location-of-a-group/9933>\
**Category:** Ruby API\
**Created:** [April 12, 2015, 2:59pm UTC](https://forums.sketchup.com/t/finding-the-location-of-a-group/9933 "2015-04-12T14:59:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![barry\_milliken\_droid](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/barry_milliken_droid/32/4612_2.png) [@barry\_milliken\_droid](https://forums.sketchup.com/u/barry_milliken_droid)\
**Post date:** [April 12, 2015, 2:59pm UTC](https://forums.sketchup.com/t/finding-the-location-of-a-group/9933/1 "2015-04-12T14:59:52Z")

</div>

There seems to be no direct mehod to tell the location of a group or any information about a group’s bounding box(?)  
Instead I must create a new bounding box by applying the group’s transformation to the the group’s “local\_bounds”. Then I can find the center and corners of the resulting bounding box.

Or maybe there’s something else in the API I’m missing?

---

<div class="post-metadata">

**Author:** ![slbaumgartner](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/slbaumgartner/32/7302_2.png) [@slbaumgartner](https://forums.sketchup.com/u/slbaumgartner)\
**Post date:** [April 12, 2015, 3:38pm UTC](https://forums.sketchup.com/t/finding-the-location-of-a-group/9933/2 "2015-04-12T15:38:23Z")

</div>

For the location and other info about its orientation, invoke methods on the Group’s Transformation, obtained via

t = g.transformation

For example, the Group’s coordinates axis origin is at

t.origin

A Group inherits the .bounds method from DrawingElement to get its bounding box.

---

<div class="post-metadata">

**Author:** ![barry\_milliken\_droid](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/barry_milliken_droid/32/4612_2.png) [@barry\_milliken\_droid](https://forums.sketchup.com/u/barry_milliken_droid)\
**Post date:** [April 12, 2015, 4:43pm UTC](https://forums.sketchup.com/t/finding-the-location-of-a-group/9933/3 "2015-04-12T16:43:19Z")

</div>

Duh! I’m always forgetting about the inheritance I’ll obtain from my rich uncle DrawingElement.

---

<div class="post-metadata">

**Author:** ![tt\_su](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/tt_su/32/17_2.png) [@tt\_su](https://forums.sketchup.com/u/tt_su)\
**Post date:** [April 13, 2015, 8:41am UTC](https://forums.sketchup.com/t/finding-the-location-of-a-group/9933/4 "2015-04-13T08:41:58Z")

</div>

Uncle `DrawingElement` is elusive and tends to hide in the family’s photo album. We should throw him a party so everybody can meet him.
