The Return of Hot Tip Harry (Hot Tip Harry AutoCAD Tutorial)1 Jan, 2008 By: Bill Kramer
Harry rejoins the magazine pages with a routine that searches his Get the Code! database.
Searching through the Get the Code! archive for a specific tip can be daunting, so this month Harry offers some assistance. Using this routine while in AutoCAD, users can search by keywords, such as layer and color, to help locate a tip.
The Get the Code! archive includes more than 1,500 tips from more than 800 authors. Among these tips you’ll find more than 1,300 LISP programs and 200 or so dialog box files. You can use each tip as is in most cases or as a starting point or reference to develop your own AutoCAD customization solution to address a similar challenge. This amazing archive also shows how AutoCAD has evolved during the past 15 years; some of these functions are just as useful for AutoCAD 2008 as they were way back when.
Tip 2264: Get the Code! Search
Harry’s new routine, Get the Code! Search, was inspired by a loyal reader, Mike Stachulak, who has compiled a list of all “Hot Tip Harry” tips (including tip names and descriptions) from 1992 through 2007 into a single, searchable Microsoft Word file. Harry awards Stachulak this month’s Top Tip honor — and a $100 prize — for sharing this invaluable resource.
You can download Stachulak’s list (getthecode.doc) as part of the January 2008 Get the Code! files available on the Cadalyst Web site (www.cadalyst.com/code). The Get the Code! archive is organized by month and year to correspond with each “Hot Tip Harry” column, dating back to 1992. (Cadalyst introduced “Hot Tip Harry” in the late 1980s. According to Harry’s legend and lore, pre-1992 code was destroyed by a virus on an old backup disk. Apparently, someone sneezed on it. But that’s just legend; no one knows the real truth to the matter. Except maybe Harry, and he’s not talking.)
Also included in this month’s batch of code is a Visual LISP program (getthecode.lsp) and 16 text files that contain the same basic information you can find online for “Hot Tip Harry” tips, including tip publication dates, titles, and descriptions. Copy these files to the default work folder and load the LISP code. The LISP program will run in versions of AutoCAD that contain Visual LISP. When you use the tool inside AutoCAD, it will help you find which month a particular tip or tool appeared. Next, type HTH at the AutoCAD command prompt to activate this simple but useful indexing tool. You will be asked to locate the file hth1992.txt if it is not found automatically. When located, the program reads the hth*.txt files and is ready for you to type in a search keyword. A dialog box pops up for that purpose. After a search is performed, the results are displayed in the dialog box. Pick the tip of interest in the list to see more details and note the month and year of publication.
You’ll find the corresponding file on the Get the Code! site at www.cadalyst.com/code. Navigate to the year and month where your desired tip resides and download the ZIP or EXE file for that month. The trick is to figure out which tip in the download is the one you want. In some cases, it’s obvious; in others, you’ll have to work at it a bit. Generally, each download contains roughly 6–12 tips, so it shouldn’t take too long to locate the specific one of interest.
Get the Code! Search isn’t fully automated, as you can see. And of course, you can always try the Search function built into the Get the Code! site. However, this routine will help those users who like the idea of launching the search from AutoCAD, and in many cases could produce better results. By searching offline for specific tips, you can determine in advance if there’s anything that may serve your purpose before visiting the Web site.
In the meantime, the library needs reader contributions to continue its growth, and Harry encourages submissions whether you’re a veteran tipster or a first-timer. Before sending your tip, check Get the Code! to be sure Harry doesn’t already have a similar routine, then e-mail Harry at email@example.com. If we publish your tip, you’ll be eligible to win some great prizes, including T-shirts, cash prizes, and a trip to Autodesk University 2008 in Las Vegas.
Until next month, keep on programmin’!
In her easy-to-follow, friendly style, long-time Cadalyst contributing editor 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!