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

Text Command - Rotation

3 REPLIES 3
Reply
Message 1 of 4
hebboppp
162 Views, 3 Replies

Text Command - Rotation

Hi,

In a program, I modify the rotation of the text.
But I the end of the program, I want to put back the original rotation of the text.
There's no variable for the rotation of the text,
how should I do that ?

Thanks,

Marcel
3 REPLIES 3
Message 2 of 4
mmoolhuysen
in reply to: hebboppp

Hello hebboppp,

The whole trick is this: Do not set a rotation inside the Text command, so the default value will stay as it was.

In your program, issue the Text commnand with the default rotation by giving "" instead of the rotition variable that you've calculated within your program. When the Text command has completed, (cdr (assoc 50 (entget (entlast)))) will give you the rotation of the Text object you just placed in radians. Substract this from the rotation you desire, convert the value into your current angle dimension somewhere (depending on in what dimension your calculated value is) and use the Rotate command to give the Text object the actual desired rotation instead of the current default one.
Alternatively, when you have an understanding of the lisp command (entmod), you could use this to change the rotation of your object after it's placed by the Text command.

With friendly greetings, M. Moolhuysen.
Message 3 of 4
hebboppp
in reply to: hebboppp

Thanks, it's working very well

Marcel
Message 4 of 4
Anonymous
in reply to: hebboppp

"mmo" wrote in message
news:f143c63.0@WebX.maYIadrTaRb...
> Hello hebboppp,
> The whole trick is this: Do not set a rotation inside the Text command, so
the default value will stay as it was.
>
> In your program, issue the Text commnand with the default rotation by
giving "" instead of the rotition variable that you've calculated within
your program. When the Text command has completed, (cdr (assoc 50 (entget
(entlast)))) will give you the rotation of the Text object you just placed
in radians. Substract this from the rotation you desire, convert the value
into your current angle dimension somewhere (depending on in what dimension
your calculated value is) and use the Rotate command to give the Text object
the actual desired rotation instead of the current default one.
> Alternatively, when you have an understanding of the lisp command
(entmod), you could use this to change the rotation of your object after
it's placed by the Text command.
>

Another alternative would be to use "entmake" to create the text in the
first place, better control over your output.

cheers
Steve

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

Post to forums  

Autodesk Design & Make Report

”Boost