Hot Tip Harry: Tips from Our Readers -- September 20068 Sep, 2006 By: Bill Kramer
This month find tips to help design highways, joists, braces and more.
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'.
In her easy-to-follow, friendly style, long-time Cadalyst contributing editor and Autodesk Technical Evangelist 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!