First you need to get the transform of the item you are dealing with. You left this information out, so I'm not sure if you are dealing with shapes or instances and how deep you might be in the hierarchy. Do you have the hierarchical path of instances to your obect so you can get the transfrom through each level of hierarchy? If you are using something like dbGetTrueOverlaps, you have this information in the results it returns. Without knowing many details, let me give you the basics.
If you have and instance id instId, you can get the transform like this:
trans = instId~>transform
This transform is nothing more than the xy location of the instance in a cellview, its rotation and its magnification. Something like:
list((50.5 100.5) "R90" 1.0)
If you have a shape inside that instance, you can transform its bounding box using this command:
topBbox = dbTransformBBox(shapeId~>bBox trans)
If you have multiple levels of hierarchy, then you'll need to combine transforms through the hierarchy. Let's assume you have a hierarchy with an instance of yourCell called yourInst placed in cell level2, an instance of level2 called L2 placed in a cell level1, and an instance of level1 called L1 placed in cell top. Your shape is shapeId inside of yourCell.
Thus your cell hierarchy looks like this: top - level1 - level2 - yourCell
Your instance hierarchy looks like this: L1 - L2 - yourInst - shapeId
If L1, L2 and yourInst are all instance ids that you have already collected, then you need to do the following:
foreach(inst list(yourInst L2 L1)
newTrans = dbConcatTransform(newTrans inst~>transform)
newTrans = inst~>transform
This loop is combining the transforms while moving up the hierarchy. The transform of yourInst must be "concatenated" with the transform of L2. This in turn needs to be concatenated with L1. When this loop is finished, you will have newTrans. This loop will work with as many levels of hierarchy as you have. You can now transform your bBox:
topBox = dbTransformBBox(shapeId~>bBox newTrans)
Please note that if you want to transform the bBox of an instance, you DO NOT need the instance id in the foreach loop. In other words, if you simply wanted the transform of yourInst instead of shapeId, then yourInst should be removed from the list in the foreach.
I hope this helps.