Thursday, July 29, 2010
Home   |   Search   |   About AUGI   |   My AUGI   |   Join Now
<< < > >>

Customization Corner: Toolbars, Part 2 - November 2005

(Discuss this Article! in AUGI's new Discussion Forums.)

Last month, I covered creating a new toolbar, adding a command and separator bar to a toolbar using the CUI editor. This month I will be talking about how to create a new flyout on a toolbar using the CUI editor, and how to lock toolbars so they aren’t moved accidentally. Two different methods of creating a flyout will be covered in this article.

What Is a Flyout?
A flyout is a collection of buttons that is displayed on a toolbar as a single button with a black arrow located in the lower-right corner of the button. The collection of buttons is really another toolbar that exists in a loaded CUI file. AutoCAD uses flyouts to allow the user to access similar tools, while keeping the user interface (UI) cleaner. Out of the box, AutoCAD 2006 utilizes only two flyouts: the Insert flyout on the Draw toolbar and the Zoom flyout on the Standard toolbar.

Creating a Flyout – Method 1
The most common flyout creation method involves first creating a toolbar that contains the commands that you want to be on the flyout. To create a custom toolbar, refer to Customization Corner, October 2005, AUGI HotNews.

  1. Launch the CUI tool by typing in the command CUI at the command line or launching it from Tools menu >> Customize >> Interface… . Make sure that the Customize tab is set current.
  2. In the Customization In pane, click the plus sign next to the Toolbars node to expand it.
  3. Right-click over the Toolbars node and select New >> Toolbar from the shortcut menu, or expand one of the existing toolbars below the Toolbar node.
  4. Select a toolbar under the Toolbars node that you want to create a flyout from.
  5. Drag and drop the selected toolbar under the toolbar on which you want to create a flyout.

  6. A new icon will appear in the location where you drop the toolbar. This icon will look just like a toolbar node. Click the plus sign next to the flyout and you should see all the commands that are part of the original toolbar.

    Note: The commands that are under the flyout are references to the original commands and not copies. So if you make a change a command under the flyout, the command will also be changed on the original toolbar.

Creating a Flyout – Method 2
It is possible to create a flyout based on a toolbar that doesn’t exist yet. The process is slightly different as you are creating a flyout on the fly and then adding commands to the new toolbar or flyout that is created. To add commands to a toolbar, refer to Customization Corner, October 2005, AUGI HotNews.

  1. Launch the CUI tool by typing in the command CUI at the command line or launching it from Tools menu >> Customize >> Interface… . Make sure that the Customize tab is set current.
  2. In the Customization In pane, click the plus sign next to the Toolbars node to expand it.
  3. Click the plus sign next to the toolbar that you want to add a flyout to.
  4. Select a command or separator under the toolbar. To help with placement, select the command that you want to add the flyout under.
  5. Right-click and select New >> Flyout. A new toolbar is created along with the new flyout. From here you can add commands to either the new toolbar or the flyout, either way will update the other one.

Stay, Toolbar, Stay...Good Toolbar
AutoCAD 2006 introduced a new UI locking feature that can be used to lock toolbars and dockable windows (palettes). This is great for keeping your toolbars in place so they don’t accidentally get moved when you go to use a command on a toolbar.

  1. Click the Padlock icon in the AutoCAD tray to display a shortcut menu.
  2. Click Docked Toolbars or Floating Toolbars. If a checkmark is next to a item, that lock feature is enabled.

The feature can also be found under the Window menu >> Lock Location, or through the use of the LOCKUI system variable. Below are the values for the LOCKUI system variable. Add the different values together to lock all the different UI elements.

0 – Toolbars and windows not locked
1 – Docked toolbars locked
2 – Docked windows locked
4 – Floating toolbars locked
8 – Floating windows locked

Conclusion
This article focused on how to create flyouts and how to lock some of the UI elements so they can’t be moved accidentally. Next month, I will talk more about using the CUI editor and wrap up the year. If you are heading to AU, I hope to see you there. Until next time, Happy Customizing...

(Discuss this Article! in AUGI's new Discussion Forums.)

Submitted by Lee Ambrosius of HyperPics LLC, a consultant and trainer for AutoCAD.


<< < > >>