Jamie Duncan
Usenet Archive
- Joined
- Jun 27, 2003
- Messages
- 177
- Reaction score
- 0
Here's a dumb routine I threw together:
(defun c:rr (/ ed1 en1 ang1 xsc1)
(prompt "Select Attribute to Rotate 90")
(while (/= (cdr (assoc 0 (setq ed1 (entget (setq en1 (car (nentsel))))))) "ATTRIB")(prompt "/nSelect Attribute or ESC")) (setq ang1 (+ (cdr (assoc 50 ed1))(/ pi 2)) xsc1 (abs (cdr (assoc 41 ed1)))) (if (> ang1 (* pi 2))(setq ang1 (- ang1 (* pi 2)))) (setq ed1 (subst (cons 50 ang1)(assoc 50 ed1) ed1) ed1 (subst (cons 41 xsc1)(assoc 41 ed1) ed1)) (entmod ed1) (redraw en1 2)
)
it will rotate the attribute 90 degrees, but the redraw will not update the attribute - what am I missing?
(defun c:rr (/ ed1 en1 ang1 xsc1)
(prompt "Select Attribute to Rotate 90")
(while (/= (cdr (assoc 0 (setq ed1 (entget (setq en1 (car (nentsel))))))) "ATTRIB")(prompt "/nSelect Attribute or ESC")) (setq ang1 (+ (cdr (assoc 50 ed1))(/ pi 2)) xsc1 (abs (cdr (assoc 41 ed1)))) (if (> ang1 (* pi 2))(setq ang1 (- ang1 (* pi 2)))) (setq ed1 (subst (cons 50 ang1)(assoc 50 ed1) ed1) ed1 (subst (cons 41 xsc1)(assoc 41 ed1) ed1)) (entmod ed1) (redraw en1 2)
)
it will rotate the attribute 90 degrees, but the redraw will not update the attribute - what am I missing?