I found some code to rotate objects around their basepoints....I am trying to edit the code to rotate single segment leaders around the midpoints instead. I am not succeeding, and I would appreciate some help if anyone sees what I am doing wrong:
;* Rotate Multiple
;* Rotates many entities around their respective basepoints
;* allows selection by AUTOCAD selection sets or SSX.
;* Written by David Husch, January 1991
(defun c:rom ()
(vl-load-com)
(prompt "Select Entities to Rotate, <ENTER> for SSX.")
(setq ss (ssget))
(setq num (sslength ss))
(setq x 0)
(if ss
(if (setq ang (getreal "Enter Rotation Angle: "))
(repeat num
(setq ename (ssname ss x))
(setq elist (entget ename))
(setq pnt (mapcar '*(mapcar '+(cdr (assoc 10 elist)) (cdr (assoc 11 elist)) '(0.5 0.5 0.5))))
(command "_Rotate" ename "" pnt ang)
(setq x (1+ x))
)
)
)
)
As is, it is merely returning the real number rotation angle and crapping out.
Thanks all,
Dan