Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Flipping linetype text

15 REPLIES 15
Reply
Message 1 of 16
OZRevit
28698 Views, 15 Replies

Flipping linetype text

Hi, I draw a linetype in my file with text in it (HW), I need to flip the text (Not the line itself) ...how is this done?

 

Many thanks

15 REPLIES 15
Message 2 of 16
OZRevit
in reply to: OZRevit

This is using AutoCAD (2007 or higher)

Thanks in advance.

Message 3 of 16
richie_hodgson
in reply to: OZRevit

Have you tried the REVERSE command, this reverses the direction of the polyline and thus flips the text.

Richie
Message 4 of 16
OZRevit
in reply to: richie_hodgson

Its a POLYLINE with text, if I issue the command REVERSE, I get unknown command...

Message 5 of 16
richie_hodgson
in reply to: OZRevit

Ok that command came in 2011 use the attached, it isn't mine so credit to Paul Frylink. load it and type RP to activate it. This reverses the direction of the selected element, in your case the polyline. So the linetype that has the text in it turnes round and thus the text turnes round.

Richie
Message 6 of 16
OZRevit
in reply to: richie_hodgson

Thanks for all your help, however in 2011, the REVERSE command still doesn't work...my polyine is the Hot Water one,

- HW ---HW---

I need to flip the HW 180 deg. (Just the text) but that is not happening with the Reverse command.

 

Message 7 of 16


@richie_hodgson wrote:

Ok that command came in 2011 use the attached, it isn't mine so credit to Paul Frylink. load it and type RP to activate it. This reverses the direction of the selected element, in your case the polyline. So the linetype that has the text in it turnes round and thus the text turnes round.


That routine and its command name RP are mis-labeled, really, since it also reverses the direction of Lines and Arcs.  And it may not matter in this situation, but it doesn't handle varying widths of Polylines correctly.  For Arcs, it assumes the PEDITACCEPT System Variable is set to 0, and will give an error on the first selection of a given Arc if it's 1 [but not if you try it again, since it will then be a Polyline].  A similar convert-it-into-a-Polyline approach [but not via Pedit] could be added to make it work with Circles.

 

But otherwise it seems to work to flip the text direction in such linetypes.  And that's the only way it can be done [you can't reverse the Text parts without reversing the Line/Arc/Polyline direction, unless you want to define a different linetype with the Text the other way up, and assign the appropriate one to individual objects].

Kent Cooper, AIA
Message 8 of 16
Patchy
in reply to: OZRevit

From 2012, linetype text will flip to readable in polyline.

Message 9 of 16
markruys2
in reply to: OZRevit

if you are on Autocad 2012+ see the linetype definition and use the  U=0.0 (upright option)

A= absolute R=relative

 

Message 10 of 16
dvertz
in reply to: OZRevit

It appears that the last posted LSP file may not be working as expected. So I thought I would post mine to see if it may help. I have attempted to overcome the issue of not working with polylines with varying widths.

 

The LSP works on lines, arcs, 2D polylines and lwpolylines. It does not work on splines.

Load the LSP and execute with "MT-revltdir".

Civil 3D 2022,
Windows 10 Pro, x64, Nvidia Quadro P1000
Intel Core i9-11900k; 3.50GHz, 32 GB RAM, 500GB WD BLACK M.2


Message 11 of 16
Kent1Cooper
in reply to: dvertz


@dvertz wrote:

.... I thought I would post mine to see if it may help. I have attempted to overcome the issue of not working with polylines with varying widths.

....


Not there yet....  In limited trial, at least for me back here in 2004, that one preserves the width of constant-width Polylines while reversing their direction, but eliminates all width entirely for those that have varying width when selected.

 

[EDIT:  It also doesn't know about 3DPolylines.  It accepts selection of one, because its group-code-0 value is the same as for 2D "heavy" ones, and it even tells you it converted it as if it's 2D, but of course it didn't succeed, and nothing gets reversed.]

Kent Cooper, AIA
Message 12 of 16
Kent1Cooper
in reply to: OZRevit

See the new thread called "Reverse direction of any directional entity."

Kent Cooper, AIA
Message 13 of 16
jlrpayne
in reply to: richie_hodgson

Worked! Thank you. I removed [1] from the name.
Message 14 of 16
Kent1Cooper
in reply to: jlrpayne

[In case you need it, the one referred in Post 12 here will reverse far more entity types than either the one on this thread or AutoCAD's Reverse command -- see the description at Post 1 on that thread, and the top of the file you can download at Post 3 there.]

Kent Cooper, AIA
Message 15 of 16
silvernich
in reply to: Kent1Cooper

So I just had the same issue.  One of my polylines with a specific text in the linetype decided to be upside down for one particular object.  What worked for me was to covert it into a 3D Poly then back to a 2D.  Don't know why that worked, but it did.  Hopefully this helps someone else.

- Nich

Civil 3D 2015
Windows 7, 64-bit, SP2
Message 16 of 16

This worked for me as well. Thank you!

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

Post to forums  

Autodesk Design & Make Report

”Boost