AutoCAD

Tips Rain Down on Harry (Hot Tip Harry AutoCAD Tutorial)

1 Apr, 2008 By: Bill Kramer

From a bountiful batch of routines, Harry praises a robust set of command functions for breaking all selected objects.


GET THE CODE
Download code for this and all articles. Look for APR08.EXE or APR08.ZIP in Get the Code. Downloads are free and are provided "as is" without warranty or support.
Tips are tested using AutoCAD 2008, 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 in AutoCAD. Tips that are missing functions or other necessary elements will not be considered.
Join the Hot Tip Harry Hot Code Contest
Calling all tip writers! The Hot Tip Harry Hot Code Contest is under way for 2008.
Share your hot tips and tricks and you could win an official Cadalyst t-shirt, $100 monthly cash prize, and a chance to win a trip to Autodesk University 2008 in Las Vegas!
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's Code Class Free E-Newsletter:
Learn from the master himself. "Hot Tip Harry" author Bill Kramer offers monthly lessons in customization programming for AutoCAD. View the archives and subscribe today!
Fresh from the AutoCAD user community, the following power tools and tricks recently rained down on our programming guru. Customization has many benefits -- not the least of which is a cool T-shirt -- when you share your handiwork with all of us by sending the code to harry@cadalyst.com. Come on, Harry's waiting!

Tip 2278: Change Xref Layer Color
Change Xref Layer Color is a utility from frequent contributor Raymond Rizkallah. In this variation of the layer-color edit, you can select multiple objects before assigning a new layer-color code. Using this tip involves loading the LISP code and typing the command XRC. As you select entity objects, a list of layers is constructed and displayed at the command prompt. When finished selecting objects, you will be asked for the integer color code to use for all the layers selected. This approach lets you change layer-color relationships in an externally created drawing to match your preferences.

Tip 2279: Viewport Synchronizer
Joel Harris submitted Viewport Synchronizer, a very useful utility for cleaning up or resetting a group of viewports. After loading the LISP code, select the viewport you want all the others to match and type ZV at the command line. The program will match all other viewport centers and sizes to the current viewport. This utility shows how easy it is to work with viewports in LISP code.

Tip 2280: External Block without Xrefs
External Block without Xrefs comes to us courtesy of Tommy Teague. This robust set of four LISP modules provides an alternative to external references and includes a text file to describe their use. Now you can jump from your main drawing into a block drawing for edits and then back with an update -- without using external references. Tommy wrote these routines for a friend and then shared them with us -- very nice!

Tip 2281: Start Polyline in Arc Mode
The Start Polyline in Arc Mode utility from Sabash Babu Podichetty shows us that it all starts with a basic macro. Load the LISP code and type SPL to start AutoCAD's Polyline command in arc mode. This macro demonstrates just how easy it is for beginners to customize the AutoCAD commands. Thanks, Sabash!

Tip 2282: Area Calculation and Output
Theodorus Winata sent in Area Calculation and Output, a very useful tool for those involved in mapping or facilities management. Comprising a LISP and a DCL dialog box, this utility allows you to select an outside boundary and inside boundaries, and then it computes the area and places the result in the drawing for you. Place the DCL file in a folder that AutoCAD will search and then load the LISP code. Type AA at the Command line to activate the dialog box for text control, the type of area calculation desired (total or net), and the units of choice (square feet or square meters). This one is another fine programming example from Theo.

Tip 2283: Pop Menu Primer
Pop Menu Primer from Michel Chayer is a Microsoft Word document that explains how to implement a POP menu-based Yes/No interface into AutoLISP routines. Also called a shortcut menu, the POP menu can be used in your custom programs to pop up near the cursor, assisting the operator in selecting options. Such customization can be tricky, but Michel's pointers will light the way. Merci, Michel!

Tip 2284: Break All Selected Objects
Top TipAlan Butler submitted this month's top tip, Break All Selected Objects, a robust set of command functions for breaking lines, lwplines, plines, splines, ellipses, circles, or arcs. Load the LISP code to find the following new commands available: MyBreak, a dialog box-based interface to several of the routines; BreakAll, the seed for all the rest; BreakwObjects, which breaks multiple objects with a single object selection; and BreakObject, which breaks a single object with other objects. Nice programming, Alan!

Until next time, keep on programmin'.


Join the Hot Tip Harry Challenge
Harry needs your tips! Do you have an original routine written in VBA, Visual LISP, or even ObjectARX for AutoCAD customization? Send it in, with all the source code, to harry@cadalyst.com. Your tip may be needed by others now, so don't delay!

Subscribe to Harry's Code Class
Cadalyst's Hot Tip Harry helps programmers and programmer wannabes learn the ins and outs of AutoCAD customization in his monthly e-newsletter, Harry's Code Class. Subscribe to Harry's Code Class today and start building your programming expertise.

Hot Tip Harry Discussion Forums
Harry is standing by online to aid AutoCAD users and programmers. Cadalyst's Hot Tip Harry -- Help! Discussion Forum offers assistance with AutoCAD programming and customization problems. Hot Tip Harry -- Requests Discussion Forum can help you locate a specific LISP or VBA routine for AutoCAD. Participation in Cadalyst Discussion Forums requires registration, but it's free.

Get Your Weekly Fix of AutoCAD Tips
Cadalyst's Tips & Tools Weekly e-newsletter mails each Monday, delivering AutoCAD tips by readers for readers -- all reviewed by Cadalyst's volunteer Tip Patrol. Plus, you'll receive a rundown of new online CAD resources, deals and freebies, new CAD-related hardware and software products, and more. View the Cadalyst Tips & Tools Weekly archives and subscribe today!

AutoCAD Users: Check out Cadalyst Tips & Tricks Tuesdays
All it takes is a minute or two, and you could be off to more productive use of AutoCAD. Cadalyst announces Tips & Tricks Tuesdays with worldwide AutoCAD Technical Evangelist Lynn Allen. Each Tuesday, Lynn and Cadalyst bring a new, super-quick tip to the Cadalyst Video Gallery. Subscribe to Tips & Tricks Tuesdays and receive an e-mail notification every time a new tip goes live in the Cadalyst Video Gallery.


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