VB.NET error in circle radius property

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
When i draw a circle in vb.net, the radius property return a wrong value, here the code:
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim doc As Document = Application.DocumentManager.MdiActiveDocument
Dim db As Database = doc.Database
Dim tr As Transaction = db.TransactionManager.StartTransaction
Dim btr As BlockTableRecord = CType(tr.GetObject(db.CurrentSpaceId, OpenMode.ForWrite, 0, 0), BlockTableRecord)
Dim centro As New Point3d(20, 20, 0)
Dim circle As Circle = New Circle(centro, Vector3d.ZAxis, 5)
btr.AppendEntity(circle)
tr.AddNewlyCreatedDBObject(circle, True)
MsgBox("Radius=" & CType(circle.Radius, String))
tr.Commit()
tr.Dispose()
The circle´s radius is 5, but the property circle.radius look like this:
The circle in Autocad (v2015) show the right value, but by Vb.net return bad values.
What is wrong in my code ?