I would like to use the entmod method to rotate the text in a Multileader object. Reading the DXF code tells me the dotted pair of 42 seems to be the rotation angle, but entmoding that does nothing. Obviously I don't know how to modify this complex object. Any pointers?
@anim8er_gie wrote:
I would like to use the entmod method to rotate the text in a Multileader object. Reading the DXF code tells me the dotted pair of 42 seems to be the rotation angle, but entmoding that does nothing. Obviously I don't know how to modify this complex object. Any pointers?
You can do it like this:
(setq sel (entsel)) (setq ent (car sel)) (setq obj (vlax-ename->vla-object ent)) (setq newang (getangle (strcat "\n Enter New Angle for MLEADER:))) (vlax-put-property obj "TextRotation" newang)
That is just the bare bones code. No error checking, etc.
Here it goes and it is the same idea of rkmcswain .
(defun c:test (/ ss ang i sset)(vl-load-com)
; Tharwat 17. 05. 2011
(if
(and
(setq ss (ssget ":L" '((0 . "MULTILEADER"))))
(setq ang (getangle "\n Specify Rotation Angle :"))
)
(repeat
(setq i (sslength ss))
(setq sset (ssname ss (setq i (1- i))))
(vla-put-TextRotation (vlax-ename->vla-object sset) ang)
)
(princ)
)
(princ)
)
Tharwat
I am using a multileader that is actually a key note callouti.e. a Hexagon around the text. This multi leader does not have the Text related properties that a normal multi-leader would have or at least it does not show up in the properties windiw. Can I modify this lisp code to rotate this multileader in similar way? Please refer to attached screenshot for more clarity.
Thanks
Vijay