Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Swap Start and End of Polyline

6 REPLIES 6
Reply
Message 1 of 7
roberte
1849 Views, 6 Replies

Swap Start and End of Polyline

Hi

 

I am using CAD 2012 and have a utility drawing where the flow diection arrows for the drainage do not relate to the actual flow direction, I believe this may be due to the direction the data was surveyed in. 

 

An example of the linetype text for surface water is a solid line followed by a gap with SW and an arrow for direction ------ SW > ------

 

Was wondering if there is a LISP command to swap the start and end points of multiple polylines so that I can select all the polylines with the flow direction arrow pointing the wrong way and make them point the right way. I know that this will cause the text to appear upside down in older versions of CAD but I don't consider that and issue, however if there was a way to keep the text the right way up in versions as old as CAD2004 that would useful.

 

Also the routine would need to work with a polyline that has more than 2 points as some of the polylines go long distances and so have mulltiple points.

6 REPLIES 6
Message 2 of 7
rkmcswain
in reply to: roberte

Have you tried the REVERSE command?










R.K. McSwain     | CADpanacea | on twitter
Message 3 of 7
braudpat
in reply to: roberte

 

Hello from France

 

+1 with rkmcswain

 

You can reverse pline since ACAD 2010 (if I remember well) but only one by one !

 

Do you need to reverse many plines in one operation ?

 

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


Message 4 of 7
rkmcswain
in reply to: braudpat

braudpat wrote:
.... but only one by one !

No, it will process multiple entities at once.

Command: REVERSE
Select line, polyline, spline or helix to reverse direction:
Select objects:

 

R.K. McSwain     | CADpanacea | on twitter
Message 5 of 7
roberte
in reply to: rkmcswain

Nice to see that autocad have an easy solution to a problem.

 

Thanks for the help

Message 6 of 7
braudpat
in reply to: rkmcswain

 

Hello rkmcswain

 

You are RIGHT and I am a "stupid" boy !

 

I was focalized by CLICK on ONE Pline then right button then Invert ...

 

Regards to Mr REVERSE !!

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


Message 7 of 7
Kent1Cooper
in reply to: roberte


@roberte wrote:

.... 

Was wondering if there is a LISP command to swap the start and end points of multiple polylines so that I can select all the polylines with the flow direction arrow pointing the wrong way and make them point the right way. ....


Even in the later versions of AutoCAD that have the Reverse command, it's limited to a few entity types.  If you need to do this with other types, or if you're in an older version that doesn't have the Reverse command, try this.  Its ReverseDirection.lsp file has the RD command, which works on more entity types than AutoCAD's Reverse.  [However, while you can reverse as many things as you want in one running of the command, you do need to go around and pick each one individually, for reasons explained at that web page.  But it also lets you Undo individual reversals within the command, without undoing all of them, in case you pick one you didn't mean to reverse.]

Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost