Quickie Lispy Query

Discussion in 'AutoCAD' started by Jamie Duncan, Jan 22, 2004.

  1. Jamie Duncan

    Jamie Duncan Guest

    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?



    --


    Jamie Duncan

    Consulting - If you're not part of the solution, there's good money in
    prolonging the problem.
     
    Jamie Duncan, Jan 22, 2004
    #1
  2. Jamie Duncan

    Jamie Duncan Guest

    never mind - brain cleared and entupd was remembered...

    --


    Jamie Duncan

    Consulting - If you're not part of the solution, there's good money in
    prolonging the problem.
     
    Jamie Duncan, Jan 22, 2004
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.