Editor's Note: This routine was updated in December 2013. Download the updated tip by clicking here.
The tip author explains the update: "At the time it only worked on imperial drawings with 1/8" as the default text height (before factoring in the dimscale) and it wouldn't work right in metric drawings. Now it works no matter the text height, and in metric drawings. I also tweaked a few things so the symbols are more consistent when different welds sizes are used on the same drawing. It's also 2012 compatible, but not 2009."
Another example of meaty AutoLISP code is a useful application for inserting weld symbols, Tip #1945 from Jerel Walker. It comes compressed in HTH1945.ZIP. This tip was written in Visual LISP and includes a dialog box to select the symbols you want to use. Save the LSP and DCL files in your AutoCAD search path and load WELD.LSP before typing Weld at the AutoCAD Command line. Weld has a series of fields in the dialog box that you select to build the type of welding symbol you want to draw. This is a great example of parametric programming.