Tip 2258: Calculate Weight
Jeffery Sanders submitted another of his professional-quality programs -- Calculate Weight -- that earns this month's top tip honor and wins the $100 prize. If you need to know the real-world weight of your product design (or a portion of it) given its material and thickness, this program is for you. The tip includes two files: a LSP program file and DCL dialog box definition. Add both files to a folder searched by AutoCAD. Load the LSP file and type Weight at the AutoCAD Command line. A dialog box displaying various materials will appear. Select the material of choice from the dialog box, pick a point inside a closed boundary (as in the AREA command), and then locate where to insert the total weight as text into the drawing. This program demonstrates a lot of LISP programming features, including lists of data manipulated with ease, a friendly dialog box, good error catching, and lots of useful comments. That earns it the top tip for this month. Great programming once again from Mr. Sanders!