Wouldn't It be easier to use EntityX, EntityY,EntityZ with MeshWidth,MeshHeight,MeshDepth to find out rx,ry,rz and lx,ly,lz instead of looping? I realize that this wouldn't work if you,ve used ScaleEntity on the mesh but otherwise I guess it would do the trick.
//PetBom
//PetBom