Tips from Our Readers – January 2007 (Hot Tip Harry AutoCAD Tutorial)1 Jan, 2007 By: Bill Kramer
Manage your blocks, automatically dimension features, use new hatch patterns and more with this month's tips.
Start the New Year off right with Jeffery Sanders's Nested Block Tree Display (Tip #2168). This tip consists of a Visual LISP file and a dialog box source file. After downloading the tip, place the DCL and LSP files in a folder searched by AutoCAD. Load the LISP file into a drawing and type Blktree at the Command line to activate. A dialog box pops up showing the names of blocks currently used in the drawing. If blocks are nested inside of other blocks, the nested block names appear under the parent block name. This is a nice way to visually check the structure of the blocks in your current drawing.
Explode Minsert (Tip #2169) is also from Jeffery Sanders. Written in Visual LISP, this utility breaks up multiple inserted blocks into individual block references. Minsert is an AutoCAD command for inserting a block multiple times at specific offset locations. Once inserted, the rows and columns of the block appear in the drawing. If you need to edit just one of the blocks, you must load Jeffery's Xminsert LISP module and type Xminsert at the AutoCAD command line. Xminsert asks you to locate a Minsert object, and it creates an inserted object at each location. You can then edit the individual block insertion. This is a robust routine capable of handling attributes as well.
Jeffery also supplied a few other tips that are rather complex and better explained at his Web sites. Click here to get his program for using variables in text and attributes and here for a program to write entity data out to a file.
As a result of his above and beyond efforts, Jeffery is our first Top Tipster of 2007. Keep on programming!
Automatic Dimensions (Tip #2170) along a line from Raymond Rizkallah is a brilliant tool for quickly dimensioning features that can be located along a line. Aligned dimensions are created for all objects of interest between two points selected in space. Objects of interest are defined by layer names or by your selection. To run, load the LISP file into AutoCAD and type DM at the Command line. Another version named DMM is also included in this tip. Automatic dimensioning is a nice feature (when it works for you).
Lanny Shiele supplied Hatch Scale Editor (Tip #2171) for quickly adjusting the scale of a hatch pattern. The Tipster's experience shows in this utility where you can adjust the scale numerically or aesthetically and quickly see the results. By aesthetics, I mean that you can increase or decrease the scale (by about 25%) to see what it looks like. This is a great tool when using hatches for shading and other artistic draft work. It's also a time-saver in general because you can quickly insert a hatch at a default scale, then visually adjust it. To use this marvelous utility, load the LISP code and type CHS at the Command line in AutoCAD. Thanks and a tip of the hat from Harry for a job well done.
Dynamic Welding Block (Tip #2172) from Phil McGrail is a great example of AutoCAD's powerful programmable block feature. Welding symbols are a perfect fit for dynamic blocks because they contain simple, yet very important markings that are changed to match the type of work to be performed. If you have never played with dynamic blocks or are looking for a one-stop solution for welding symbols, check out Phil's cool block. Not all AutoCAD programming requires a text editor, as shown by this nifty tip.
Have you ever wanted to pick objects that are outside of a window area? Select Outside of Window (Tip #2173) from Sanjay Kulkarni may be just what you've been looking for. Load the LISP code into AutoCAD, and the new selection feature becomes available. When you start a command such as Copy or Erase, a modified prompt appears informing you that options WO and CO are now available during selection. These work just like the normal inclusive and crossing window, except that objects outside of the box are selected instead of those inside. Sanjay employed a command reactor to get the prompt to appear when you start a command, and this is a great example of how you can juice up AutoCAD to fit your needs.
Bolt-Hole Circle Generator (Tip #2174) from William Townsend is another great example of letting LISP accomplish all the hard work. Load the LISP code and type BC1 at the AutoCAD Command prompt to activate the command. After entering the basic parameters needed to draw a bolt-hole series in a circular pattern, this routine goes a bit further by automatically annotating the series (prompted option when running) and placing variable center marks. In his e-mail, William indicates that he has looked for other bolt-hole generators and found several; the problem was that none of the others did it the way he needed. The solution was to do it himself, and we are very pleased that he shared it with all of us.
Attribute Match (Tip #2175) from Will DeLoach is a wonderful utility for manipulating attributes in an AutoCAD drawing. Load up the LISP code and type Matchatts in AutoCAD to get it started. The first thing is to select a block insert that contains attributes. The program dynamically creates a DCL (dialog control language) file and displays it. The dialog box contains the attribute tag names as toggle selections. Click the toggle for the attributes to be copied, select OK and pick the blocks you want updated. The program only updates the attributes of blocks of the same insert name that gives them the value from the first insert instance selected. This is a beautiful program, well structured, and full of great programming examples for those learning LISP.
Watson Kilbourne supplied Paving Squares Hatch Pattern (Tip #2176). This tip consists of a PAT file that needs to be located in the AutoCAD search path, then selected using the custom hatch pattern option inside the Bhatch command. The result is a random-looking layout of paved bricks for your new patio design. This is another neat pattern from the library of Watson Kilbourne!
Mark Newman sent in Drawing Clean Up and Save for AutoCAD 2007 (Tip #2177). When loaded into AutoCAD, Cleansave runs the AutoCAD Audit command and then performs a quick save of the drawing. CAD systems managers with many different operators to watch over may find this clean-and-save function quite handy because it forces a drawing audit before the save (just in case the operator did something that might cause problems in future loads).
Happy New Year!
Thanks to all the tipsters for helping to get 2007 off to a great start! Keep those programs, utilities, hatch patterns, macros and customization tips coming. Everyone really appreciates all your efforts, and together everyone gets better at running AutoCAD.
In her easy-to-follow, friendly style, long-time Cadalyst contributing editor and Autodesk Technical Evangelist Lynn Allen guides you through a new feature or time-saving trick in every episode of her popular AutoCAD video tips. Subscribe to the free Cadalyst Video Picks newsletter and we'll notify you every time a new video tip is published. All exclusively from Cadalyst!