confused with simple routine

I want to change the justification of text.
(defun c:mct ( / ent new old) (setq ent (entget (car (entsel))) old (assoc 72 ent)
new (cons 72 1) ent (subst new old ent) ) (entmod ent) )
I think 72 is the code for justification, and when I make text entities (72 . 0) is what I see for LC, (72 . 1) for MC and (72 . 2) for MR justified.
the 11 DXF group is slightly different, but I could live with a small shift.
problem is when I use this my text goes off to 0.0. ?????
I run the code line by line and the 72 is the only thing changing. Why does it move?
I (setq it (entget (car (entsel)))) to the moved entity and, by golly, (11 0.0 0.0 0.0)
10 and 11 somehow work together, but I don't get it yet. help?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
you must set the (assoc 11) group to be at the point where the alignment is..this is why you see them as "slightly different". If you want the text to remain in the same place but have a different justification then you will need to calculate where that alignment point is and set the (11 . XXX.X XX.X XXX.X) to the appropriate value.
Hint, use (textbox) (assoc 50) and (polar) to determine that point.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.