Edgtrimmer Posted July 20, 2018 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
Lee Mac Posted July 20, 2018 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
ronjonp Posted July 20, 2018 Posted July 20, 2018 Lee Mac said: 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
Grrr Posted July 20, 2018 Posted July 20, 2018 ronjonp said: Nice trick to grab the first point Lee also did something similair here Quote
Lee Mac Posted July 20, 2018 Posted July 20, 2018 Edgtrimmer said: Wow, Lee. Thanks! It works! You're welcome ronjonp said: Nice trick to grab the first point Thanks! Quote
Shaun Wright Posted December 12, 2019 Posted December 12, 2019 On 7/20/2018 at 4:41 PM, 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) Expand Quote
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.