using (DocumentLock doclck = doc.LockDocument())
{
using (Transaction trans = db.TransactionManager.StartTransaction())
{
BlockReference br = trans.GetObject(per.ObjectId, OpenMode.ForWrite) as BlockReference;
ObjectId blockId = br.BlockTableRecord;
BlockTableRecord btr = trans.GetObject(blockId, OpenMode.ForWrite) as BlockTableRecord;
Point3d org = btr.Origin;
Point3d pmin = br.Bounds.Value.MinPoint;
Point3d pmax = br.Bounds.Value.MaxPoint;
Point3d newPos = (Point3d)(pmin + (pmax - pmin) / 2); //center of graphical area of entities.
Vector3d vec = org.GetVectorTo(newPos);
Matrix3d mat = Matrix3d.Displacement(vec);
br.RecordGraphicsModified(true);
trans.Commit();
}