Hot Tip Harry: Tips from Our Readers -- February 20063 Feb, 2006 By: Bill Kramer Cadalyst
Great LISP calculators, plus drawing archival preparations and much more.
Drawing Archival Preparations (Tip #2087), from Craig Goings, is this month's top tip. Written in VBA to allow multiple drawing manipulations, this routine will load a drawing and then rebind external objects to a local folder for easy archiving. In the download file set for this tip, a read file from Craig explains the operations in much more detail, and he points out where VBA hackers might want to change a few things to match their own archiving requirements. Great job, Craig, and thanks for sharing this power tip with everyone!
Charles Allred's Dimensions Manipulations (Tip #2088) makes dimension editing a snap. Load the LSP file into AutoCAD and type DIMSWEEP at the Command line to activate the utility. DIMSWEEP presents three choices: Replace, Restore and Remove. Replace changes the dimension value to a text string, allowing you to move the dimension components without changing the data displayed. Restore is then used to change the text back into an associated value, and Remove gets rid of the text altogether. Edits to dimensions are much easier with this great example.
Tipster Paul Hinds sent in two useful tips. Block Name Replacement (Tip #2089) and Modified Array Command (Tip #2090) are examples of how easy it is to customize AutoCAD to your needs. In #2089 you load the LSP file and type REPLACE at the Command line. Select the block inserts you want to change, type in the new block name to use (which you should have already defined in the drawing), and this routine takes care of the work. Harry noted that this tool is helpful when you need to update a lot of block occurrences in a drawing with a new library of figures. Tip #2090 is a modified version of the AutoCAD Array command for making multiple copies of objects in a rectangular pattern. After the LISP code is loaded, type MARRAY to run. Instead of having to know the distances between objects, MARRAY uses two end points and a count of how many spaces you want between the end points. Simple yet effective is the name of the game in LISP customization, and Paul's nailed it.
Now the calculation utilities Harry dropped off. These utilities are generally pretty short, and you can use them in a variety of ways. You might modify the reporting utilities to retrieve a value you need, use them as is or build them into command macros. The first utility is Compute Arc Values (Tip #2091) from Derek Beals, which computes one of the values of an arc given the others. This program runs as you load the LSP file and displays the results of the calculations in an alert box. Calculations include arc length given included angle and radius, included angle given radius and arc length, and radius given arc length and included angle. You don't find these calculations on many calculators even though they are pretty simple.
Thomas Christman supplied Scale Calculator (Tip #2092) for quickly calculating a scale factor or ratio for a detail area in a drawing. It will also calculate the dimension linear scale factor for the scaled detail area. Two functions are in this tip, DSCALE and DFACTR. After loading the LSP file into AutoCAD, type DSCALE if you know the drawing scale factor and scale factor of the details (e.g.: 2X is simply 2). The resulting scale ratio (1:n) is presented along with the required setting for the linear scale factor when dimensioning. DFACTR computes the scale factor given the detail ratio if those are the values known.
Fibonacci Sequence Polynomial Factor Computation (Tip #2093) came from Robert Gillies. Rather than explain the Fibonacci sequence and how you can use it in computer simulations along with other analyses, let me just say that this tip is an elegant solution that employs several clever mathematical tips. If you need a Fibonacci generator, then get your hands on this tip!
Our last tip of the month comes from Mike Lavelle. Distance Command (Tip #2094) is an improved distance command for AutoCAD. Load the LSP file and type D at the AutoCAD Command prompt. After you supply two points, the function presents the distance between the two along with vector, angular and alternative units. This distance command goes the distance!
Thanks for the great tips everyone! Keep them coming in, and visit Harry's new online forums where you can suggest ideas for tip creators and discuss tips with other users.