Hot Tip Harry: Tips from our Readers -- January 200514 Jan, 2005 By: Bill Kramer Cadalyst
Figure areas, create views, fill walls and more.
The First Tips of 2005
Before we look at the top tips of 2004, here are Harry's picks for January 2005. Wrap Objects (Tip #2004) by Stephen Cunliffe creates a polyline boundary around the outside of selected objects in a drawing. This is a handy utility for figuring the area of something drawn as many objects. Load the LSP file and enter the command WR to get started. AutoCAD asks you to select objects, and the boundary function takes it from there. Nice programming job with good comments.
A simpler function is Number of Viewports (Tip #2005) from Chad Douglas, a utility that creates a bunch of views in the active layout. Load the LSP file, then type the command NUMVIEW. Enter the number of equal-sized viewports you'd like in the current layout, and they are created automatically. This is a great time saver.
Self-proclaimed Queen of CAD Dina Jacobson offers Centroid Lines (Tip #2006), a VBA tip that draws lines along the centroid of 3D solid objects in AutoCAD. These lines are then usable in an associated finite element analysis program to perform advanced simulations. Although appropriate for a limited number of users, it's an excellent example for those wondering how to manipulate 3D solids in AutoCAD using VBA. A tip of the hat to the CAD Queen.
Cobblestones Hatch Pattern (Tip #2007) is supplied by Harry's favorite pattern guy, Watson Kilbourne. Once again, Watson proves that he knows patterns with a clever yet simple pattern that can be used to draw cobblestone drives or paths in maps.
Wall Fill (Tip #2008) is a short and useful routine from Randall Rieks. Load the LSP routine and run the command function WF. AutoCAD requests a point on the wall line and then the wall's center line. It creates a polyline at the centerline with a width twice the distance from the first point to the second. This routine is a great example of how easy it is to code functional LISP macros, although it does require that the layer A-WALL-FILL exist before running.
Leonid Nemirovsky supplied Multiple Xref (Tip #2009) that repeats the selection of xref drawings for import into the current drawing at a registration point. Once again, Leonid's simple approach points the way to better automation of your own environment.
The last of this month's tips, Display Viewport Scales List (Tip #2010), comes from Steven Noe. This simple example iterates through the viewport objects defined in the drawing and lists their names and scale factors. This is handy when creating a list of document views for a client.
Top Tip 2004 Winners
We're off and running with another year and another new Top Tip contest! Thanks for the tips submitted thus far and keep them coming in. Harry's readers not only want useful tools, but also examples of how to exploit the various features of AutoCAD.
Now it's time to turn the clock back and consider the top tips of 2004. To be fair, only the tips from January 2004 through November 2004 are being considered. The 2005 contest will cover those tips that appear from December 2004 through November 2005.
The top winners were first selected from all the tips submitted to Hot Tip Harry for publication. Visitors to the Cadalyst Web site then voted for their favorites. Those with the most votes were presented to Harry for final judging. Harry considered them for technical merit and elegance?the hardest of his tests! The length of the program is not as important as how easy it is to read and thus maintain.
And the winners are:
$1,000: Tip #1996, LISP Manager, by Jeffery Sanders
$500: Tip #1945, Weld Symbol Generator, by Jerel Walker
$250: Tip #1958, Text Box, by Clay Riggs
Congratulations! Next month, you can find Harry online at www.cadalyst.com/harry. Don't forget to keep on voting for your favorite tips.