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

Align or rotate objects parallel to X axis

5 REPLIES 5
Reply
Message 1 of 6
demus72
8014 Views, 5 Replies

Align or rotate objects parallel to X axis

Is anyone aware of a lisp routine or macro that will either rotate or align selected objects so they are parallel to an axis on the current UCS? Specifically, when placing mtext to label an object. I typically align my ucs to the object then create the text so it is parallel to the object. It would be great if I could create the text with a rotation of 0, align my ucs to the object to be labeled and then with a single click, select the text making it parallel to the X axis. Would anyone care to share their lisp or macro?

 

Thanks for the help.

5 REPLIES 5
Message 2 of 6
FSJ_Mo
in reply to: demus72

You should just type out your text at any rotation (it doesn't matter) and use the "TORIENT" command. It allows you to align your text to any 2 points that you pick, and you don't have to muck about with your UCS.

Message 3 of 6
Alfred.NESWADBA
in reply to: demus72

Hi,

 

you might use parametrics? E.g. start command _GCHORIZONTAL and select your textobject (you might remove the constraint if you don't need it later on).

For other parts look to the "Parametric" ribbon.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 4 of 6
demus72
in reply to: FSJ_Mo

Thanks for the reply FSJ_Mo. I have never used Torient before. I will look into that command.

 

As we all know, there are many ways to accomplish the same task in Autocad and everyone has their own personal preferences on how to go about accomplishing that task. More than likely, most prefer what ever method they learned first. I work with the UCS a lot. I use a button on a toolbar to align my UCS to an object which takes two clicks. From there, if I could click on another toolbar button with a macro built to give the selected text a rotation of 0, select the text, that would only take two clicks. If such macro exists and I could track it down, I could accomplish my task in four clicks. I'm simply trying to be more efficient.

 

Thanks.

Message 5 of 6
Alfred.NESWADBA
in reply to: demus72

Hi,

 

>> if I could click on another toolbar button

You find my command also as a button in the parametrics-ribbon, so two clicks for alignment of an object to horizontal (or vertical or parallel to any object or ...)

 

>> I could accomplish my task in four clicks. I'm simply trying to be more efficient

You always have the chance to create your own buttons, it's up to you (and possible with AutoCAD 😉 ).

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 6 of 6
nestly2
in reply to: demus72

I think FSJ_MO's suggestion of TORIENT is going to be hard to beat using only what's built into AutoCAD..  You have the option of aligning the text with an object using only two clicks, using polar tracking, or specifying an absolute angle  (0 if you've already reoriented the UCS)  If the UCS is already aligned. This macro will align a text with the X-axis just by clicking the text  ^C^C_TORIENT;\;0;

 

Other possible solutions: 

 

http://www.lee-mac.com/dtcurve.html

 

http://www.lee-mac.com/curvealignedtext.html

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

Post to forums  

Autodesk Design & Make Report

”Boost