Thanks for the reply
I think i have corrected the problem and capable of compiling the output dll but while i run the dll (AutoCAD) i cannot see the circle and here is the code
"
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Geometry
Public Class ArunCommands
"CommandMethod("acir")" _
Public Sub acir()
Dim db As Database = HostApplicationServices.WorkingDatabase()
Dim trans As Transaction = db.TransactionManager.StartTransaction()
Try
Dim poo As PromptPointOptions = New PromptPointOptions("Specify Center: ")
Dim por As PromptPointResult
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
por = ed.GetPoint(poo)
If por.Status PromptStatus.OK Then
Return
End If
Dim ecx As Double
ecx = por.Value.X
Dim ecy As Double
ecy = por.Value.Y
Dim ecz As Double
ecz = por.Value.Z
Dim cen As Point3d
cen = New Point3d(ecx, ecy, ecz)
Dim gdis As PromptDistanceOptions = New PromptDistanceOptions("Specify the rad: ")
Dim rad As PromptDoubleResult
rad = ed.GetDistance(gdis)
Dim radi As Double
radi = rad.ToString
Dim cir As Circle = New Circle(New Point3d(ecx, ecy, ecz), Vector3d.ZAxis, radi)
Dim bt As BlockTable = trans.GetObject(db.BlockTableId, OpenMode.ForRead)
Dim bts As BlockTableRecord = trans.GetObject(bt(BlockTableRecord.ModelSpace), OpenMode.ForWrite)
bts.AppendEntity(cir)
trans.AddNewlyCreatedDBObject(cir, True)
trans.Commit()
Catch ex As System.Exception
trans.Dispose()
MsgBox("Error Msg is: " + ex.Message)
End Try
End Sub
End Class