Manufacturing

Hot Tip Harry: Tips from our Readers -- January 2005

15 Jan, 2005 By: Bill Kramer Cadalyst

Figure areas, create views, fill walls and more.


GET THE CODE
Download free code for this and all articles. Look for JAN05.exe in Get the Code.

Tips are tested with AutoCAD 2005, unless otherwise noted. By submitting code to Cadalyst, you grant Cadalyst the right to print and distribute your code in print, digitally, and by other means. Cadalyst and individual authors retain all rights to the code, and it is not to be used for commercial purposes. Downloads are provided "as is" without warranty or support.

All published tips are entered into the annual Hot Tip Harry Contest. From a pool of reader-selected monthly winners, our judges will pick the Top Tip for 2005. The first prize is $1,000. Second place wins $500, and third place, $250. E-mail those tips and tricks to harry@cadalyst.com.

NO! YOU'RE NOT GIVING this to me, are you?" Harry handed me an envelope smudged with coffee and labeled Top Tips from 2004?SECRET! Shaking, I started to open it. "Don't open that!" Harry said. "Check these out first!" He stuffed a CD into my drive before I could stop him. The drive quivered to life. That's when I noticed Harry starting to fade out. He grinned at me, saying, "I'm going cyber, baby." And with a wink, he vanished.

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.


About the Author: Bill Kramer


AutoCAD Tips!

Lynn Allen

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!
Follow Lynn on Twitter Follow Lynn on Twitter


Poll
At your company, who has the most say in CAD-related software purchasing?
CAD manager
CAD users
IT personnel
vice-president/department manager
CEO/company owner
Submit Vote