[Search tip detail and code files using keywords, tip number, author name, etc ]
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Divide and Measure Plus
Tip# 3353 By Kent Cooper On 22-Feb-2010
Rated By 4 users Downloaded : 3819
Categories : 2D Operations
Software type : AutoCAD 2010
Rename File To : DivideMeasurePlus.lsp
Improved versions of the Measure and Divide commands include multiple entity selection and more.

Kent Cooper shares a LISP routine that creates "turbocharged" versions of the Measure and Divide commands. There are more than a dozen improvements over the built-in commands, including allowing for missed picks, multiple entity selection, the ability to use any block in the search path, and memory of your previous choices. The details are included as comments in the code. To use these commands, load the LISP file and then enter MEA+ to use the enhanced Measure command, or DIV+ to use the enhanced Divide command. If you use Measure or Divide regularly, this LISP file can be a real time-saver.

Update, January 2012: The author provided another updated version; see comments as follows:

Some of the changes are just code streamlining (eliminating some unneeded variables and subroutines, etc.).  Minor operational update:  Enter and Space now end the routine (it doesn’t require Escape), instead of resulting in the user being asked again to select something.  Major functional upgrade:  it now has the option to mark the divide/measure locations with Lines, of user-specified length, perpendicular to and centered on the path objects.
For Blocks and user Selections, the rotation choices now have not only 0 and Aligned-with-the-path-object [as regular Divide and Measure do], and the any-fixed-angle option that DIV+ and MEA+ have always had, but a new R option to place them at any angle Relative to the path object.

So you put Blocks in under the Aligned rotation option, and they turned out to be facing in the wrong direction because of the direction of your path object?  You don’t need to redefine your Block, or reverse the direction of the path object, or convert an Arc into a Polyline so you can make it run in the clockwise direction; you can just do DIV+/MEA+ over, using the Relative-to-the-path-direction angle option, and ask for 180 degrees, to turn them around.  Or you can place arrowheads not as directional indications but as markers, “pointing” at the path object rather than along it, with a Relative angle of 90 or 270 degrees.

Update, August 2010: The author provided another updated version; see comments as follows:

1.  By request from someone on AutoDesk’s AutoCAD Customization Discussion Group, the DIV+ command now has the option to inset the endmost Points or Blocks or Selection-set insertions by a User-specified distance from the ends of the selected path object.  It applies the Dividing operation to the remaining length between those inset locations.
2.  I figured one might want to use the same Block or Selection set in >both commands.  In either of them, if you've named a Block in that command, that has always been offered as the default, and it now also offers the prior Selection set in the Selection option, if there is one.  But now, if you haven't yet chosen a Block or Selection in the command you're using, but you have done so in the other command, that other command's Block or Selection is offered as the default.
3.  In the Blocks option, if you haven't named a Block for either command yet, but ordinary Insert has a default Block name, that is offered.
4.  In the Blocks option, both commands formerly exited if you entered a Block name that was neither defined in the current drawing nor a Drawing in the Support File Search path(s).  Now they don't give up on you, but ask you again.
5.  In the Selection option, in either command, you can choose to use the prior Selection used in the command you're in, or the set used most recently in the other command, without needing to re-select anything.  (Choices are offered only for such Selections as have been established.)

Update, March 2010: The author provides an updated version of his original tip; see comments as follows:

I have just finished making an improvement to it, to give the User the option to Select Objects to be placed along the path object, in addition to the usual Points and Blocks options.  It uses Copybase and Pasteclip, functioning as though the selected objects were defined as a kind of temporary Block, without the need for a Block definition or for a Block name.  It effectively lets the DIV+ and MEA+ commands serve, under the Selection option, as “Array Along an Object” commands with ordinary object selection as in ordinary Array, but with all the more sophisticated choices about spacing and rotation that those commands offer for Points and Blocks.



Average Rating:

User comments
Comment by Elrod,Kent
Posted on 2010-03-19 10:40:02
Everyone should run, not walk, to get this routine. Hard to believe it is free, that is a lot of code to give away. Thanks
Comment by thompson,alan
Posted on 2010-04-28 23:30:03
Nice work. :) Here's a very similar one I did not long ago. http://www.cadtutor.net/forum/showthread.php?t=46309
Comment by Sherry,Stephen
Posted on 2017-04-11 10:18:39
Hi, I've asked around a few places but no luck in finding any LISPs that can space objects equally between two points. I'm learning the basics at the moment but this is beyond my skill level. I would wonder if this could be easily modified to do as the attached? Thanks.