Just some starting questions....
Looking at how a routine might identify the rectangle if it's in a Block, before even considering how to pull coordinates from it:
Is the rectangle a single object? Presumably a Polyline? Or is it made up of four Lines? A Block itself? A 2D Solid, or 3DFace?
Whatever it is [or they are], are there other objects of the same kind in the Block? If so, are there characteristics of the rectangle by which it can be distinguished from those other objects? [For example, it will be the only closed 4-vertex Polyline in the Block? Or the only thing on its Layer? Or...?]
Would the Block ever be Inserted with scale factors other than 1, and/or rotation other than zero? Would other-than-1 scale factors ever be not equal to each other [in absolute value]?
Probably other questions will arise, but start with those.
Kent Cooper, AIA