The DXF group codes for the arc that might apply for your routine are:
Arc group codes:
10 Center point (in OCS). DXF: X value; APP: 3D point
20, 30 DXF: Y and Z values of center point (in OCS)
40 Radius
50 Start angle
51 End angle
Lwpolyline group codes:
10 Vertex coordinates (in WCS), multiple entries; one entry for each vertex. DXF: X value; APP: 2D point
20 DXF: Y value of vertex coordinates (in WCS), multiple entries; one entry for each vertex
90 Number of vertices.
128 = plinegen
There also is a lisp routine called "Circle2Pline" by Jason Piercey that converts circles to polylines using lwpolines. What it does is change a circle to a polyine, and then you will later be able to change the width of the line (you cannot change the width of a circle, and you do not have to use the donut command.
It does not work on circles, but you may want to study it and it might lead you to some ideas for your routine.
Flores