AutoCAD

Hot Tip Harry: Tips from Our Readers -- September 2006

8 Sep, 2006 By: Bill Kramer

This month find tips to help design highways, joists, braces and more.


Great News for Harry Tipsters! Hot Tip Harry Challenge 2006, sponsored by Autodesk, just got better with even bigger prizes. You already know that the author of each published tip will receive a Cadalyst t-shirt, and the author of each month's best tip will receive $100 cash. Now, authors of all tips published in 2006 also will be entered into two year-end drawings. One lucky winner will receive a copy of AutoCAD 2007, courtesy of Autodesk, and a second winner will receive a trip to Autodesk University 2006 in Las Vegas, Nevada. For contest details and rules or to submit your tip, go to www.cadalyst.com/harry2006.

GET THE CODE
Download code for this and all articles. Look for SEP06.exe in Get the Code. Downloads are free and are provided "as is" without warranty or support.

Tips are tested using AutoCAD 2006, 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.

Important note: Be sure your submission contains all elements required for it to run independently using AutoCAD 2006. Tips that are missing functions or other necessary elements will not be considered.

All published tips earn the author a Cadalyst
t-shirt, and the tip judged best each month earns the author $100. Click here for details about the Hot Tip Harry Challenge 2006.

E-mail those tips and tricks to harry@cadalyst.com.

For More AutoCAD Tips More Often: Check out Cadalyst's free Tips & Tools Weekly e-newsletter. View the archives and subscribe today!

Harry passed along some great tools sent in by readers this month. These are hard-core production power tools. Let's dig right in!

Joist/Truss Notation Tool (Tip #2144) from Jay Thomas simplifies the annotation of joists and trusses. Place the files for this tip in the LISP or DCL folder in AutoCAD's support path before running. After it's loaded into AutoCAD, type Jnote2 to activate the command function. It requests two points that represent the span limits and then the dialog box appears. In the dialog box, select the type of note you want to appear above and below the span dimension. Harry says this utility is a super time saver as well as a swell example of how to make your own dimensioning power tools.

Curly Braces in VBA (Tip #2145) from Scott Sawdy draws a large curly brace given two points. The program example is supplied as a text file that you can copy into a VBA macro module. Once in the VBA environment, run the macro named Brace. It requests two points that represent the end points of the brace. The brace is always drawn so that it's pointing to the left of the line defined by the two points you enter. If you want the brace to face left, give the top point first. For a right facing brace, give the bottom point first. If you're looking for a nice VBA example that shows the basics, you found it in this tip!

Copy Drawing File (Tip #2146) from Paul Scirpo is a system management utility that lets you quickly copy a file from another folder into the current drawing work folder. The program remembers the folder name that the detail drawing was selected from so you can copy multiple details into the project folder without having to navigate to the source each time. This is a nice simple example of the VL functions in AutoLISP for files.

Add Parentheses to Existing Text (Tip #2147) from Jim Cunningham is a power text editor. After loading the LSP into AutoCAD, type the command Jparenth to activate. Select the text to be edited (you can use a window because the selection is filtered for text objects only) and press Enter. At this point, you can supply an optional text addition that is appended to all the existing text before the closing parenthesis is added. Just press Enter with no entry if you don't want to add anything to the text except for the parentheses. Nice job, this is a great example for those wanting to build power text editor tools and is very useful.

Offset Based on Arc Length (Tip #2148) from Derek Beals shows how you can use AutoLISP to augment existing AutoCAD commands. In Derek's case, he needed the arc length of an existing arc to feed the AutoCAD Offset command. Load the AutoLISP file then type AO at AutoCAD Command line, select an existing arc object and the Offset command starts with the arc length already supplied as the offset value. The AutoLISP source contains other very useful functions for arc data manipulation and is worth a peek to see if there is something you might need to compliment your own library.

Center Line Profile (Tip #2149) from Pedro Ferreira creates a profile detail with given contours and a centerline to follow. This utility is exceptionally powerful in highway design for which it was created. A sample drawing to test with is also provided. Load the sample contour and center line drawing, then load the AutoLISP program. Activate the program by typing QP at the Command prompt. The program needs three basic inputs: the name of a layer where the contours are stored, the entity representing the centerline and the vertical exaggeration factor to use when drawing the profile detail. The contours should be polylines, splines and lines drawn at the proper elevation. The center line should be a lightweight polyline. This is an extreme powertool for civil engineers involved in highway and bridge design!

Steel Details (Tip #2150) from Parag J Badiani draws structural steel sections based on quick selections in a dialog box. Three files are included with this tip: AutoLISP source code, DCL dialog code and a DOC file that contains the standard size information used inside the program. Copy all three files to a folder in the AutoCAD search path and load the AutoLISP code. Type Ddsteel to start the dialog box, pick the size and then type of section to draw along with an insert point.

The top tip of the month goes to Pedro Ferreira for Tip #2149. That's a nifty set of programming work and very useful for those in the business of designing highways.

Make the Cut
Wondering if your tip will make the cut? Here are a couple tips. Make sure you include the source code so Harry can check your sources. Supply a simple version when using add-on packages to bypass any special features -- that includes the Autodesk add-on packages as well. Harry's tips are for regular AutoCAD systems and should be in AutoLISP or VBA. Thanks for all the great tips and keep on programmin'.


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
Which file format do you use most often for CAD drawing/model exchange?
Native format
PDF
3D PDF
DWF
STEP or IGES
JT
IFC
Other
Submit Vote