Hey all,
this lisp take's the rotation of a block, the rotate a text to the same rotation, -90°
if text is upsidedown then ratote 180°
only works good if i am in wcs
can some one tell me how do i use "trans" ? are a ontherway
Thx JOhn
(defun c:MRot (/ ) ;
(and
(setq Sel1 (entsel "\n Select object with desired rotation: "))
(setq Sel2 (entsel "\n Select object to change rotation: "))
(setq rot1 (vla-get-Rotation (vlax-ename->vla-object (car Sel1))))
(setq rot2 (- rot1 1.57079633)) ; rotate 90
(if (or
(<= rot2 -1.57079633)
(> rot2 1.57079633)
); end and
(setq rot3 (- rot2 3.14159266)); if ok
(setq rot3 rot2); if not ok
); end if
(vla-put-Rotation (vlax-ename->vla-object (car Sel2)) rot3)
)
(princ)
)