Tip or Treat? (Hot Tip Harry AutoCAD Tutorial)1 Oct, 2008 By: Bill Kramer
This month's goodies include a utility to annotate profile data.
Tip 3012: Maintain Selection Sets to Copy
Ronald Maneja sent in an interesting set of functions that allow you to maintain multiple selection sets ready to copy. In Maintain Selection Sets to Copy, the command functions Q1, Q2, and Q3 operate like the Copy command. The first time you run one of the Q functions, you are asked to define a selection set of entity picks to be used in a Copy command. The next time you run the same Q function, the previous selection set is automatically selected for the Copy command. To clear the set, type RQ1, RQ2, or RQ3 respectively. This routine uses the global symbols SS1, SS2, and SS3 to house the selection sets and PTS1, PTS2, and PTS3 for the points, meaning they could interfere with existing programs in your system. Harry recommends that you change these common symbol names to something more cryptic, then have at it.
Tip 3013: Manipulate a Selection Set
In his second tip of the month, Manipulate a Selection Set, Maneja demonstrates how to manipulate a selection set by creating a temporary red box around the limits of the combined entities. Load the LISP code and type BBS to try it out. After you specify the selection set, a red box will highlight the limits of the entities selected. Programmers will find this tip a handy example to learn from when investigating how to manipulate a selection set and how to find the limits of the set so the screen can be adjusted. The screen adjustment may be needed if your application will be adjusting the entities using AutoCAD edit commands inside LISP code. Thanks to the Wizman — and a tip of the hat from Harry!
Tip 3014: Fix Pointing Leaders
Fix Pointing Leaders from Phil Tingley provides a set of tools to ease the work of fixing leaders pointing at holes that have been moved. Two command functions are included in the tip: FL (fix leader) and EL (edit leader). After loading the LISP code, type FL at the AutoCAD Command prompt to move the tip of the leader to point at a hole or endpoint. Use EL to add another vertex into the leader string. These hardcore productivity tools are from a shop where the drawing process keeps changing. Sound like your place?
Tip 3015: Calculate Excavation Area Volume
Theodorus Winata sent in Calculate Excavation Area Volume. This tip determines the volume of closed excavation areas using a depth you supply, then annotates the drawing with the calculated information. Two sample drawings are included. Load either the metric or Imperial drawing and the VOL.LSP file. Type Vol at the AutoCAD Command line and follow along in the dialog box to create the text annotations. Another expert system from a software genius!
Tip 3016: Subdivide Lot into Desired Areas
Subdivide Lot into Desired Areas from Noel Gemilga divides a subdivision lot into the specific areas you desire, equal or unequal. This tip continues the theme of an expert drawing system by automating tedious work. Take a look at the included JPEG image for a better understanding of this tool. Start with a simple lot layout, and this routine will divide it into equal areas following a generally horizontal route through the area. When you've defined a basic lot, draw an Xline through it, then load the LISP code. Type AS at the AutoCAD Command line to activate the utility and follow the prompts. Although not useful for everyone, this code is nicely done and illustrates how LISP can solve problems of this nature.
Tip 3017: Annotate Profile Data
Pedro Ferreira submitted this month's top tip, Annotate Profile Data, which is an expert annotation system for profile data. A sample drawing shows how this system works and how you can adapt it to your own requirements. Open the drawing and load the LISP code that comes with it. Type AP to get it started and answer a couple of prompts with information from the drawing. The rest is automatic. This example employs the Visual LISP enhancements and is a wonderful productivity tool for civil engineers.
What great tips! Keep sending them in and be sure to check out the improved CAD Tips site. Thanks for reading and until next time, keep on programmin'.
Join the Hot Tip Harry Challenge
Harry needs your tips! Do you have an original routine written in VBA, Visual LISP, or even ObjectARX for AutoCAD customization? Send it in, with all the source code, to firstname.lastname@example.org. Your tip may be needed by others now, so don't delay!
Subscribe to Harry's Code Class
Cadalyst's Hot Tip Harry helps programmers and programmer wannabes learn the ins and outs of AutoCAD customization in his monthly e-newsletter, Harry's Code Class. Subscribe to Harry's Code Class today and start building your programming expertise.
Hot Tip Harry Discussion Forums
Harry is standing by online to aid AutoCAD users and programmers. Cadalyst's Hot Tip Harry -- Help! Discussion Forum offers assistance with AutoCAD programming and customization problems. Hot Tip Harry -- Requests Discussion Forum can help you locate a specific LISP or VBA routine for AutoCAD. Participation in Cadalyst Discussion Forums requires registration, but it's free.
Get Your Weekly Fix of AutoCAD Tips
Cadalyst's Tips & Tools Weekly e-newsletter mails each Monday, delivering AutoCAD tips by readers for readers -- all reviewed by Cadalyst's volunteer Tip Patrol. Plus, you'll receive a rundown of new online CAD resources, deals and freebies, new CAD-related hardware and software products, and more. View the Cadalyst Tips & Tools Weekly archives and subscribe today!
AutoCAD Users: Check out Cadalyst Tips & Tricks Tuesdays
All it takes is a minute or two, and you could be off to more productive use of AutoCAD. Cadalyst announces Tips & Tricks Tuesdays with worldwide AutoCAD Technical Evangelist Lynn Allen. Each Tuesday, Lynn and Cadalyst bring a new, super-quick tip to the Cadalyst Video Gallery. Subscribe to Tips & Tricks Tuesdays and receive an e-mail notification every time a new tip goes live in the Cadalyst Video Gallery.
Autodesk Technical Evangelist Lynn Allen guides you through a different AutoCAD feature in every edition of her popular "Circles and Lines" tutorial series. For even more AutoCAD how-to, check out Lynn's quick tips in the Cadalyst Video Gallery. Subscribe to Cadalyst's free Tips & Tools Weekly e-newsletter and we'll notify you every time a new video tip is published. All exclusively from Cadalyst!