SuperCharging AutoCAD

Mechanical
Desktop

Introduction to AutoCAD
Mechanical

3D Basics

Introduction to AutoCADl

Introduction to AutoLISP
Training

Intermediate
AutoLISP
Training

Refresher/Update for AutoCAD 2000-2002

Registration

Creating a Custom Toolbar Flyout
In April's Tip Sheet, we explored creating a Custom Toolbar in AutoCAD 2002.  This month we'll add a custom toolbar flyout.

First, create a toolbar that will be used as the new flyout. See April's Tip Sheet if you don't know how.  In this example, I've created a toolbar named Circle and added most of the Circle command buttons to it.  I'll be adding the flyout to the
Draw toolbar. Now, right-click on any toolbar button and select Customize… from the menu.

Next, left-click on the Commands tab to add buttons from the command button library.

To add a flyout, left-click on User defined in the list of Categories and drag the User Defined Flyout to the desired location in the Draw toolbar. I've placed mine to the right of the standard Circle button.

Associating the Flyout
The next step is to associate the flyout button with a toolbar.  Just left-click on the new flyout button.

The alert button above will be displayed.  This is just telling you that the default toolbar UNKNOWN  doesn't exist.  Left-click on the OK button to select a toolbar to associate or link to the flyout button.

Locate the Circle toolbar in the list, left-click on and then left-click on the Apply button. Lastly, left-click on the Close button to complete the customization.

The flyout appears next to the Circle button and contains all the buttons in the Circle toolbar.

Menu Codes - Toolbar
If you are ambitious (or curious) you can view the code behind the Circle toolbar and the flyout.  Toolbars customizations made within AutoCAD are stored in the *.MNS file.  You should be able to find this in the \Support folder where AutoCAD is installed.  You can edit it with a text editor like Notepad or Wordpad. First, let's look at the code for a single toolbar button.

Button Codes
[_Button("Circle Center Diameter", "ICON_16_CIRDIA", "ICON_16_CIRDIA")]^C^C_circle \_d

Circle Center Diameter the name of the button

ICON_16_CIRDIA name of the small icon

ICON_16_CIRDIA name of the large icon

^C^C_circle \_d the macro executed when the button is selected

Flyout Codes
[_Flyout("User Defined Flyout", ICON_16_BLANK, ICON_16_BLANK, _OtherIcon, ACAD.CIRCLE)]

User Defined Flyout the name of the button

ICON_16_BLANK name of the small icon, if OwnIcon is specified

ICON_16_BLANK name of the large icon, if OwnIcon is specified

ACAD.CIRCLE name of the toolbar used by the flyout.

OtherIcon indicates the last selected button is displayed.  If this is set to OwnIcon, then the icon designated in the flyout is displayed.  In the example below, the ICON_16_CIRCLE icon would be displayed, regarldless of the last icon selected.

[_Flyout("User Defined Flyout", ICON_16_CIRCLE, ICON_16_CIRCLE, _OwnIcon, ACAD.CIRCLE)]

You can find out more about the button and flyout code in the Customization section of AutoCAD Help file.

That's it for this month's Tip Sheet.  I'll continue with the topic of toolbar customization next month, focusing on User Defined buttons, creating icons and an introduction to developing macros.