Public Function TextRec(ByVal _DBText As DBText, Optional ByVal offset As Double = 0.0) As Point3dCollection
Dim point3dCollection As Point3dCollection = New Point3dCollection()
Try
Dim rotation As Double = _DBText.Rotation
Using DBT As DBText = CType(_DBText.Clone(), DBText)
DBT.TransformBy(Matrix3d.Rotation(-rotation, Vector3d.ZAxis, _DBText.Position))
Dim MAT As Matrix3d = Matrix3d.Rotation(rotation, Vector3d.ZAxis, _DBText.Position)
Dim geometricExtents As Extents3d = DBT.GeometricExtents
point3dCollection.Add(New Point3d(geometricExtents.MinPoint.X - offset, geometricExtents.MinPoint.Y - offset, 0.0).TransformBy(MAT))
point3dCollection.Add(New Point3d(geometricExtents.MinPoint.X - offset, geometricExtents.MaxPoint.Y + offset, 0.0).TransformBy(MAT))
point3dCollection.Add(New Point3d(geometricExtents.MaxPoint.X + offset, geometricExtents.MaxPoint.Y + offset, 0.0).TransformBy(MAT))
point3dCollection.Add(New Point3d(geometricExtents.MaxPoint.X + offset, geometricExtents.MinPoint.Y - offset, 0.0).TransformBy(MAT))
End Using
Catch ex As Exception
End Try
Return point3dCollection
End Function