[Search tip detail and code files using keywords, tip number, author name, etc ]
 
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Circle to Polyline and Polyline to Circle
Tip# 3683 By Kent Cooper On 17-Jul-2011
5
Rated By 1 users Downloaded : 4655
Categories : Curved Objects, 2D Editing
Software type : AutoCAD 2012
Rename File To : CirclePolylineSwap3.lsp
Convert circle entities to polylines and vice versa.

Editor's Note: This LISP file was updated in March 2015. The tip author commented: "Someone found that in the P2C command, when applied to multiple circular Polylines with global non-zero width, if the User chose to have the Circles at the Inside or Outside edges of the original Polylines, it would make the conversion at the correct edge for only one of them, and the rest would all come out Centered on their Polylines' original width. That's been corrected, and a few other little things tidied up."

Editor's Note: This LISP file was updated in August 2011. The update does not affect the operation of the commands themselves; the only change is that using Undo after the commands now works as expected. 

Kent Cooper submits two complementary functions in this LISP file. The first one converts circle entities to polylines in AutoCAD; the other converts polylines to circles. (Of course the second function can only convert polylines that can be represented by a circle, such as those created with the Donut command.) Start by loading the LISP file, then type in C2P to convert circles to polylines, or P2C to convert polylines to circles. Existing properties such as color, linetype, and lineweight are maintained, and both commands work in any UCS. Be sure to read the comments in this well-documented LISP file, which contain more details on the operation and limitations of these functions.

 

Average Rating:
5


User comments
Comment by Henry,Ezeagu
Posted on 2016-09-06 09:47:53
Thank You very much, it works