I believe you can find the start point and endpoint of a pline and then use command 2p to make the circle. Now, not having looked at your drawing, I assume you might have a pline that has multiple breaks. This would be a little more complicated, but if you find points that are a certain distance apart, you might be able to program the proper start and end points. Sorry, not much help in the programming arena. I just don't have the time for it.