Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using entmod to rotate text in a Multileader.

3 REPLIES 3
Reply
Message 1 of 4
anim8er_gie
1940 Views, 3 Replies

Using entmod to rotate text in a Multileader.

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?

3 REPLIES 3
Message 2 of 4
rkmcswain
in reply to: anim8er_gie

 


@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.

 

R.K. McSwain     | CADpanacea | on twitter
Message 3 of 4
_Tharwat
in reply to: rkmcswain

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

Message 4 of 4
kvvijay
in reply to: _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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost