Edgtrimmer Posted July 20, 2018 Share Posted July 20, 2018 Had to rotate a floorplan 180 along with all multileaders and text. I can easily select multileaders and change angle to 0 in Properties but text ends up on top of leader or in wrong position relative to leader. It would be great to have a command able to select a group of multileaders and step through them rotating them a desired angle about the end of the leader. Any takers? Thanks! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted July 20, 2018 Share Posted July 20, 2018 Try this quick one - (defun c:rml ( / a i o s ) (if (and (setq s (ssget "_:L" '((0 . "MULTILEADER")))) (setq a (getangle "\nSpecify rotation angle: ")) ) (repeat (setq i (sslength s)) (setq i (1- i) o (vlax-ename->vla-object (ssname s i)) ) (vla-rotate o (vlax-3D-point (mapcar '+ (vlax-invoke o 'getleaderlinevertices 0) '(0 0 0))) a) ) ) (princ) ) (vl-load-com) (princ) 1 Quote Link to comment Share on other sites More sharing options...
Edgtrimmer Posted July 20, 2018 Author Share Posted July 20, 2018 Wow, Lee. Thanks! It works! Quote Link to comment Share on other sites More sharing options...
ronjonp Posted July 20, 2018 Share Posted July 20, 2018 Try this quick one - (defun c:rml ( / a i o s ) (if (and (setq s (ssget "_:L" '((0 . "MULTILEADER")))) (setq a (getangle "\nSpecify rotation angle: ")) ) (repeat (setq i (sslength s)) (setq i (1- i) o (vlax-ename->vla-object (ssname s i)) ) (vla-rotate o (vlax-3D-point [b](mapcar '+ (vlax-invoke o 'getleaderlinevertices 0) '(0 0 0))[/b]) a) ) ) (princ) ) (vl-load-com) (princ) Nice trick to grab the first point Quote Link to comment Share on other sites More sharing options...
Grrr Posted July 20, 2018 Share Posted July 20, 2018 Nice trick to grab the first point Lee also did something similair here Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted July 20, 2018 Share Posted July 20, 2018 Wow, Lee. Thanks! It works! You're welcome Nice trick to grab the first point Thanks! Quote Link to comment Share on other sites More sharing options...
Shaun Wright Posted December 12, 2019 Share Posted December 12, 2019 On 7/20/2018 at 9:41 AM, Lee Mac said: Try this quick one - THANK YOU SOOOO MUCH LEE! (defun c:rml ( / a i o s ) (if (and (setq s (ssget "_:L" '((0 . "MULTILEADER")))) (setq a (getangle "\nSpecify rotation angle: ")) ) (repeat (setq i (sslength s)) (setq i (1- i) o (vlax-ename->vla-object (ssname s i)) ) (vla-rotate o (vlax-3D-point (mapcar '+ (vlax-invoke o 'getleaderlinevertices 0) '(0 0 0))) a) ) ) (princ) ) (vl-load-com) (princ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.