Visual LISP, AutoLISP and General Customization

Reply
New Member
Posts: 2
Registered: ‎03-22-2013
Message 11 of 13 (135 Views)

Re: Rotate multiple lines around their midpoints

03-22-2013 07:38 AM in reply to: v.azarko

This code worked very good for me. Thanks a lot!

*Expert Elite*
Kent1Cooper
Posts: 4,982
Registered: ‎09-13-2004
Message 12 of 13 (122 Views)

Re: Rotate multiple lines around their midpoints

03-22-2013 11:03 AM in reply to: wolffeelings

wolffeelings wrote:

This code worked very good for me. Thanks a lot!


v.azarko may not still be around, but....

 

I looked that over, and noticed some things that could be done more simply, and what seemed like some shortcomings, and came up with the attached RotateLinesAbsAng.lsp and its RLAA command.  Aside from being shorter, some of the functional differences are:

 

Lines on locked Layers can be filtered out during selection, reporting on any that it finds in the selection process, rather than trying to rotate them, counting up the errors that result from those on locked Layers, and reporting the count of those afterwards.

 

Theirs asks for the angle after selection in the pre-selected-items [noun-verb] mode [obviously], but before selection in the verb-noun mode.  Mine asks for it after selection in both cases, which is also more analagous to the way regular Rotate works.

 

In noun-verb mode, theirs keeps all pre-selected items highlighted, even those that are not Lines or are on locked Layers and therefore won't be rotated, while asking for the angle.  In verb-noun mode, it highlights even Lines that are on locked Layers during selection.  Mine shows only the Lines that will be rotated highlighted, in both modes.

 

If you type U after using theirs, it doesn't undo just what that command did, but goes back past that to undo whatever previous command you did!  Using U after mine undoes its own operations only.

 

And some other little things....

Kent Cooper
New Member
Posts: 2
Registered: ‎03-22-2013
Message 13 of 13 (112 Views)

Re: Rotate multiple lines around their midpoints

03-22-2013 02:41 PM in reply to: Kent1Cooper

Thanks a lot! I will try it out! 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you interested in helping shape the Autodesk Community?
We’re looking at a few different ways to improve the “All Forums” landing page and need your feedback! If interested, please take a few minutes to fill out the following Usability Study. Thank you for your time!

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community