AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN

Have you ever heard of a variable that will allow you to align text to a current ucs angle and not the wcs. I have written a basic program to rotate text & mtext to zero angle, using an entmod on assoc 50. The routine works a treat when set to world cs, but only the mtext works in a user cs, the text still rotates as though wcs was set. The code is below if anyone would find it useful:

(DEFUN C:ut(/ p l n e new as)
(command "undo" "be")
(prompt "\nSelect Text to rotate")
(setq p (ssget))
(setq n (sslength p))
(setq l 0)
(setq entit (cdr (assoc 0 (setq e (entget (ssname p l))))))
(while (< l n)
(if (OR (= "TEXT" entit)(= "MTEXT" entit))
(progn
(setq s (cdr (setq as (assoc 50 e))))
(setq new (cons 50 0))
(setq e (subst new (cons 50 s) e))
(entmod e)
(setq l (1+ l))
);PROGN
);IF
);WHILE
(command "undo" "END")
);defun



Dennis.

The AutoLisp/Visual Lisp/VBA Resource Website

Copyright 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website