Hi, Ranjit. Thanks coming to the rescue again 🙂
I've used the cond code you mentioned (I like those), but it doesn't work - it goes as far as asking for the angle, but then it give me an error message: "; error: bad argument type: lentityp nil".
Here's the code I have - the blue is from the code you wrote, the red is what I'm trying to do each time:
(defun c:RotMultBase ( / ss ang )
(vl-load-com) ; start VLisp
(setq ss (ssget "_:L" '((0 . "Insert,Text,MText,MultiLeader"))))
; Main code
(setq ang (getangle "\nSpecify Rotation Angle: ")) ; allows for 2-point cursor input
(cond
((= (cdr (assoc 0 (entget ent))) "MultiLeader") ; isolate multileaders and do the following:
(mapcar '(lambda (x) (setpropertyvalue x "MText/Rotation" (+ (getpropertyvalue x "MText/Rotation") ang)))
(vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
)
)
(t ; for the rest (Insert,Text,MText), do this:
(
(lambda ( i / e o )
(while (setq e (ssname ss (setq i (1+ i))))
(vla-put-rotation (setq o (vlax-ename->vla-object e))
(+ (vla-get-rotation o) ang)
)
)
)
-1
)
)
)
(princ)
)
Each code works individually - the one you made (and dbroad) and the one that rotates blocks, texts, and mtexts (from Lee Mac). I'd just like to have them in a single set of code...
Any chance you can spot where I made a mistake?
Edgar