[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.
Reverse Entity Direction
Tip# 3975 By Kent Cooper On 14-Sep-2012
0
Rated By 0 users Downloaded : 1571
Categories : Object Properties, Display Properties, 2D Editing
Software type : AutoCAD 2013
Rename File To : ReverseDirection.lsp
Reverse lines, arcs, circles, polylines, ellipses, splines, and mlines.

Editor's note: Updated in February 2014. The tip author made these comments about the newly updated LISP file: "As before, you can undo individual reversals as you go, within one running of the command. Now, after completion of the command, Undoing undoes the entire command, that is, it returns all objects affected within that running of the command to their previous directions. This is in keeping with the operation of other 'multiple-operation' commands with internal Undo options, such as Line (the Undo option within it undoes just the last-drawn Line in the sequence; Undoing after completion takes away all Lines drawn within that command), and similarly for Pline."

Updated in October 2012. The tip author made these comments about the updated LISP file: "It has a counter for individual-reversal Undoing within the running of the command, and the original version still contained a mistakenly left-over counter incrementer
within the part that reverses a selected line, in addition to the generic incrementer that follows the reversal of any valid selected object. So the count of how many things had been reversed would get off if any of them were lines, and it would continue to erroneously offer the Undo option even after all reversals had been undone. That's been fixed."

Kent Cooper brings us another improved version of a LISP routine this month. Kent found several other routines that allow you to reverse the directions of entities in AutoCAD, then put his code together to solve the limitations he observed. Generally you reverse entities to change the direction in which complex linetypes, specifically text-based ones, are rendered. AutoCAD even has its own built-in command to reverse entities, but it too is limited to a few entity types. Kent’s routine works on lines, arcs, circles, polylines (any variety, including curve-fitted 2D and splined 2D or 3D), ellipses, splines, and mlines. Start by loading the LISP file, then type in the command RD. Different entity types in your selection may generate different prompting, so the routine only allows you to pick one entity at a time. As usual with Kent, the LISP code is packed with comments and a large preface containing all sorts of details regarding how this routine interacts with each supported entity type. Great job, Kent.

 

Average Rating:
0


User comments
Comment by Cooper,Kent
Posted on 2012-10-02 17:18:58
Another reason for it to have you pick one entity at a time is that for certain entity types (even for certain varieties of some entity types), it must approximate the reversed version in one way or another (sometimes even using a different entity type), and it asks you for a level of precision for that approximation. It contains an internal one-reversal-at-a-time Undo option, so if you don't like the result in a case like that, you can undo that reversal and redo it with a different precision, without undoing any other reversals you've done in the same running of the command.