AutoCAD

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

10 Mar, 2006 By: Bill Kramer Cadalyst

Our top tip draws section lines in three different ways.


GET THE CODE
Download code for this and all articles. Look for MAR06.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.

Greetings from Harry! These hot tips are just in and were tested for accuracy. Harry reports that he is seeing some interesting coding styles and that the idea farm is far from empty. To show what he means, here are a set of annotations and quick action macros.

Explode Multilines (Tip #2095) from Don Wells creates polylines in place of the multiline elements. The normal AutoCAD Explode command creates a series of lines, but this version creates polylines. The multiline object is first exploded with the resulting line objects going to the temporary layer MultiTemp. These lines are then gathered and joined into polylines as the result of the utility. Nice programming and very useful.

Section Lines (Tip #2096) from Bill Townsend draws section lines in a drawing three different ways. Load the LISP code into AutoCAD to make the new commands available. SE1 draws a section line consisting of three segments. SE2 draws a simple two point section line. SE3 allows you to draw a multiple-point polyline as the section cut definition. The program places section lines on layer SectionLine in red and annotates the section line with input provided by you. This utility set is nicely built and quite useful if you need section lines.

Slope Annotation (Tip #2097) from Leonid Nemirovsky inserts a block with attributes for marking the slope angle. The block is inserted at the default scale and angle for blocks in the current drawing with the attributes filled in based on user input. This tip is a great example of how you can make custom commands that get the job done quicker. Combining AutoLISP with AutoCAD commands and entities is the best way to improve productivity.

Level Annotation (Tip #2098) from Raymond Rizkallah inserts a block with attributes for marking an elevation level. A series of commands first defines a reference block and then makes copies for different elevation level markings. The system works in metric only. Type L-HELP for a description of the commands available after loading the LISP file. Nicely structured application with easy-to-read code.

Brian Lottis sent Snap Angle Setting (Tip #2099), a quick and dirty routine to assist in setting a snap angle. Load the LISP program and type RS at the Command line. Two points are requested to define a new snap angle. Reset the snap angle to zero by not entering a first point. This tip is a wonderful example of how you can streamline AutoCAD commands to suit your purpose.

LISP Loader (Tip #2100) from Jay Thomas is a focused variation of the AutoCAD Appload command. Load the LISP code and then type LOL at the AutoCAD Command prompt. The program will attempt to locate the original source file LOL.LSP and then display a file selection dialog box showing all the LSP files in that directory. Select one and pick Open to load the LISP code. Using LISP to load more LISP is exactly what this language was created to do.

Slot Generator (Tip #2101) from Steven Johnson accepts parameter input for drawing a slot at any angle. Load the LSP code and type SLOT at the Command line to activate. Two options are available. You can define a slot from end to end or from center to center. After making your choice, enter (or show) the slot angle, width and length. The last bit of input is the center point of the slot. After supplying the parameters, the slot is drawn at the point selected. This tip works great and shows that there is definitely more than one way to draw a slot.

This month's top tip is Section Lines (#2096) from Bill Townsend. Nice programming and very useful as well as the fact that this simple set of functions is a classic example that all skill levels of users can use and learn from. Even if you have no need for section lines in your drawing work, the code supplied is worth a read for ideas and approaches. Thanks and a tip of the fedora to Bill from Harry!

Have you stopped by Harry's online forum yet? We are looking for ideas, issues and solutions for everyone who customizes AutoCAD. It does not matter if you are a beginner or an expert. Harry's forums are open to all. Just keep on the topic of customization.

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 Tips & Tricks Tuesdays free e-newsletter and we'll notify you every time a new video tip is available. All exclusively from Cadalyst!
Follow Lynn on Twitter Follow Lynn on Twitter


Latest News from Cadalyst Partners
Feed
AutoCAD WS is now AutoCAD 360   24 May, 2013

I wanted to share this blog post from Steve Bedder regarding AutoCAD WS/AutoCAD 360. This will be of interest to any WS...More>>Read more Without a Net blog posts>>

Feed
Load ‘Em Up! Stackers, Conveyors, and Advanced Assembly   23 May, 2013

Mineral resources come out of the ground and are then processed into energy, fertilizer, steel, and so on. We all kind of knew that already. But...More>>Read more PTC Creo blog posts>>

Feed
Excel Hyperlinks & Document Management Tricks   22 May, 2013

Do you have to keep track of a lot of different folders and files? Do you wish you peers could open the correct Revit file? Are you tired of having...More>>Read more BIMbuilder blog posts>>

Feed
Can spatial aptitude tests help predict your success as an engineer?   24 May, 2013

Do you enjoy taking these tests?  I know I...More>>Read more SolidWorks Blog posts>>

Feed
Sunglass.io Launches Library, Brings 400+ Suppliers to the Collaboration Platform   24 May, 2013

Here’s a quandry. How many supplier-certified parts and assemblies do you need to make your 3D viewing experience via the web worth it? What if...More>>Read more SolidSmack blog posts>>

Poll
What type of input device (besides the keyboard) do you use at your primary CAD workstation?
Standard mouse
Trackball mouse
Programmable mouse
3D navigation device
Pen/tablet
Multiple devices
Submit Vote




Considering Wide Format Printing Solutions?
Four FREE White Papers Available:






Subscribe Cadalyst Newsletters