AutoCAD

Avatech Tricks: Fillet & Chamfer: Multiple Choice – Part 1

15 May, 2005 By: Jerry Berns Cadalyst

Pick one of three different ways to automate commands


In the first part of this series, I will demonstrate how to automate the Multiple option of the Fillet and Chamfer commands. I will also discuss other repeating methods, contrasting the pros and cons of each.

In the other parts of this series, I will demonstrate how to create custom Fillet and Chamfer toolbars with preset values. The final article in the series will show you how to turn those custom toolbars into flyout toolbars.

Your Choices
Prior to the introduction of the Fillet and Chamfer Multiple option, the Multiple command let you repeat almost any command from the Command Prompt. Once activated, a command would repeat until you pressed the key or selected another command from a menu or toolbar.

Making a menu or toolbar command repeat required some menu customization. By placing an asterisk "*" as the first character in the menu or toolbar macro, the command would repeat in a manner similar to the Multiple command mentioned above. The key would need to be pressed or another command selected.

As an example, to make the Fillet command repeat in earlier versions of AutoCAD, you'd write a menu and toolbar macro as follows:

*^C^C_fillet;
* Activates the multiple execution mode.
^C^C Cancels any other command currently running.
fillet; The Fillet command. A semicolon is shown here to represent the key. A space character is the alternate symbol for , but a semicolon is certainly a more visible character. The space character is commonly used in AutoCAD menus. Commands are not case-sensitive.
_ The language translator (underscore) symbol. It is not required in your macros unless you wish to share with international users of AutoCAD.

Though I'm illustrating the Fillet command here, you can edit almost any AutoCAD menu or toolbar command to include this repeating character. In fact, try the Point command -- its macro uses the asterisk symbol to repeat the command. Refer to the AutoCAD Command Reference documentation for more information about the Multiple command.

Pros and Cons
By adding an asterisk to a macro, you can make almost any command repeat. This automation saves you from moving to the menu again and again or pressing the key to cause the command to repeat. The downside to this method, albeit minor, is you must cancel the repeating command with the key or choose another command to cancel. Because the command restarts each time, to reverse the command you use the Undo command for each instance.

The Fillet and Chamfer commands can benefit from the repeat character; however, the Multiple option, introduced in AutoCAD 2004, offers two improvements. First, the user can press to exit the command. Second, a single Undo command reverses all fillets or chamfers performed with the macro. These enhancements often make the new option preferable over the previous methods.

The Multiple Choice
The Fillet and Chamfer buttons could be edited so that the macros would look as follows:

^C^C_fillet;u;
^C^C_chamfer;u;

Note that the Multiple option is selected with the letter "U" as shown (figure 1).

figure
Figure 1. The Fillet command with Multiple option.

Keyboard Shortcut
Customizing the Fillet and Chamfer toolbar buttons certainly makes it easier to create multiple fillets or chamfers, although some users still prefer to type commands. For that reason, you can add the following AutoLISP code to your ACAD2004DOC.LSP or ACAD2005DOC.LSP file to gain the benefit of the Multiple option:

(defun C:F () (command "FILLET" "u")(princ))
(defun C:CHA () (command "CHAMFER" "u")(princ))

If you prefer the Multiple command method instead:

(defun C:F () (command "MULTIPLE" "FILLET")(princ))
(defun C:CHA () (command "MULTIPLE" "CHAMFER")(princ))

Have You Made Your Choice?
I have discussed three ways you can repeat AutoCAD commands with particular focus on the Fillet and Chamfer commands. Each method has its unique advantages. I hope you find one or all of these examples will help you work more efficiently in AutoCAD.


About the Author: Jerry Berns


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