ILoveMadoka Posted April 17, 2014 Share Posted April 17, 2014 Does someone have a routine (or know of a way) to reorder a column of text items? ie: Line 1 Line 2 Line 3 Line 4 to Line 4 Line 3 Line 2 Line 1 I have a large table of text that I need to flip the column order. Has someone posted something along these lines? Is there an Autocad command I don't know about? I have had no luck in any of the search terms I have used.. Thanks for all the help you guys provide... Quote Link to comment Share on other sites More sharing options...
ymg3 Posted April 17, 2014 Share Posted April 17, 2014 Is it a true autocad table or simply line of text ? Post a drawing Quote Link to comment Share on other sites More sharing options...
ILoveMadoka Posted April 17, 2014 Author Share Posted April 17, 2014 Lee Mac to the rescue once again!!! Dynamic Text Alignment v1.6 http://www.lee-mac.com/dynamictextalignment.html I had to jump through some hoops but Lee's program made it all possible. Could your next update allow a text column to be rotated 360 degrees instead of limiting it 180? (seems that is how it worked) I had to rotate the text in place 180 degrees then use Autocad to rotate the entire column 180. Awesome! Still quite a time saver! Thanks Lee! ps: It was all regular text entities Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted April 17, 2014 Share Posted April 17, 2014 I'm glad my Dynamic Text Alignment program came in handy! Here is another way to achieve the same result: ([color=BLUE]defun[/color] c:revtxt ( [color=BLUE]/[/color] e i l s ) ([color=BLUE]if[/color] ([color=BLUE]setq[/color] s ([color=BLUE]ssget[/color] [color=MAROON]"_:L"[/color] '((0 . [color=MAROON]"TEXT"[/color])))) ([color=BLUE]progn[/color] ([color=BLUE]repeat[/color] ([color=BLUE]setq[/color] i ([color=BLUE]sslength[/color] s)) ([color=BLUE]setq[/color] e ([color=BLUE]entget[/color] ([color=BLUE]ssname[/color] s ([color=BLUE]setq[/color] i ([color=BLUE]1-[/color] i)))) l ([color=BLUE]cons[/color] ([color=BLUE]list[/color] ([color=BLUE]assoc[/color] ([color=BLUE]if[/color] ([color=BLUE]and[/color] ([color=BLUE]=[/color] 0 ([color=BLUE]cdr[/color] ([color=BLUE]assoc[/color] 71 e))) ([color=BLUE]=[/color] 0 ([color=BLUE]cdr[/color] ([color=BLUE]assoc[/color] 72 e)))) 10 11) e) ([color=BLUE]assoc[/color] -1 e)) l) ) ) ([color=BLUE]mapcar[/color] '([color=BLUE]lambda[/color] ( a b ) ([color=BLUE]entmod[/color] ([color=BLUE]list[/color] ([color=BLUE]cadr[/color] a) ([color=BLUE]car[/color] b)))) ([color=BLUE]setq[/color] l ([color=BLUE]vl-sort[/color] l '([color=BLUE]lambda[/color] ( a b ) ([color=BLUE]<[/color] ([color=BLUE]caddar[/color] a) ([color=BLUE]caddar[/color] b))))) ([color=BLUE]reverse[/color] l) ) ) ) ([color=BLUE]princ[/color]) ) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 18, 2014 Share Posted April 18, 2014 This prompted me to a slightly different question you have 3 individual columns of text but only want to sort on 1st column wrote a export columns that joins the text into single row then using Lee-Mac's would allow sort. Any one wants it post request here. It was done to export to excel to sort. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.