Putting the Q in the QAT
The Quick Access toolbar (QAT) can be found in many software products including Microsoft Office and Autodesk design software including AutoCAD® and its verticals. Figure 1 shows the QAT in Autodesk AutoCAD (1) and then again in Microsoft Word (2). The Quick Access Toolbar is a customizable toolbar that contains a set of commands grouped together. The QAT, by default, is found in the upper-left corner of the application window. Many people use the QAT for printing, saving, and opening files—the basic commands we all need. AutoCAD gives us the ability to customize the QAT to a new level. You can right-click to add a command, create a custom command, or even add a macro with a custom button to launch from the QAT. In this article we are going to explore how to turn the QAT from a part-time user to a full-blown productive application.
Figure 1: Quick Access toolbars
Most of the default tools located in the QAT are related to CAD drawing and management tasks such as New, Open, Save, Undo, etc. Basic commands can be added to the QAT by selecting the application arrow and checking any of the default items on the list shown and they will be added to the current QAT. You must also be aware that the QAT is linked to your current workspace. We will review how to create multiple QATs later in this article.
Note: Show the menu bar on this list (Figure 2) will display the menu bar above the ribbon. I am not sure why this is there since it does not have much to do with the QAT. This setting can be controlled by typing menubar at the command prompt and changing it from 0 to 1. Let’s talk about adding more commands.
Figure 2: Adding basic commands
Show Me More
When selecting more commands from the drop-down you will bring up a command list window. This window is the CUI editor showing only the command list area. We are going to add Dimension, Match Properties, and the Circle commands. Start typing within the command list area and AutoCAD will find the commands matching your letters (notice how I typed match and the CUI found three). Then with your mouse, select the command and drag directly into the QAT area. When finished, hit Apply-OK and your new commands will be added.
A Right-Click Away
One of the more preferred methods of adding a command is to right-click the command and select Add to Quick Access toolbar. This time we will right-click the layer combo control box. A dialog box will pop up and we will select Add to the Quick Access Toolbar as shown in Figure 4. Notice how the combo box is added right next to your workspace. Continuing on with the same method, we will now add the text command to the bar as shown. We have just added two separate commands to our current QAT.
Figure 3: More commands to drag
Figure 4: Right-click to add commands
Creating Custom Quick Access Toolbars
Now that we have covered the basics we are going to create several QATs and link those to different workspaces. In the previous exercise we added tools to the current QAT, which in many cases is named Quick Access Toolbar 1 and is linked to all default workspaces in AutoCAD. Let’s copy that QAT and rename it, then create a new workspace and attach that new QAT to the new workspace.
On the Manage Tab – Customization panel on the ribbon, choose user interface to display the Customize user interface editor (Figure 5). In the Customization pane we are going to pull out our Quick Access Toolbars section and right-click and select Copy (1). Then we will Select the Quick Access Toolbars heading and select Paste (2).
Right-click your copied QAT (named Quick Access Toolbar 2 by default) and rename to AUGIWorld as shown in Figure 6. We have now created our own QAT, which we can connect to a workspace.
Figure 5: Copy and Rename your QAT
Figure 6: AUGIWorld QAT
Figure 7: Attach the QAT to your workspace
We are next going to attach our new QAT to our workspace (Figure 7). On the Manage tab go to the CUI Editor or type CUI at the command prompt. Make sure your AUGIWorld workspace is current; select that and drag over to the Customize Workspace pane right under your Quick Access Toolbar 1 (will be shown) and notice it will change to AUGIWorld. Close the CUI editor and now your customized QAT is current with your workspace.
Using the CUI to Add a New Command to the QAT
Now that we have our QAT connected to our Workspace we are going to change a command then add a new custom command. Open up the CUI and pull out the AUGIWorld QAT as shown in Figure 8. The section shown with the vertical red arrow is the order of the commands that are in your QAT. This is where you can drag the commands around to what you are comfortable with.
We will explore this further with the layer combo control box. Touch the layer combo control box and notice how the Properties pane appears to the right. Many people ask, “Now that I have that up there, how do I increase the width so I can see the entire layer name?” The default value is 208 as shown in Figure 8. Change that value to 300 and watch your layer combo box change within the QAT (this number will react differently depending on your monitor). This affects only the QAT attached to your current workspace and not the general combo box on your ribbon. A very cool trick!
Figure 8: Changing the Layer Combo Control width
Next up we are going to create a custom command and add it to the QAT. Go back and open the CUI as we have done before and pull out the AUGIWorld QAT. Move down to the bottom left pane to the command list area and select the star (create a new command) as shown in Figure 9. This will launch the editor to create a new command.
Figure 9: Create a new command
We are going to move over to the right panes of the CUI and use both the top and the bottom sections. Notice how I started with Step 1, the command; we will get to the button at the end. We are going to create a macro to change the text case from lower case to upper case. Under section one, name the Command TUP (for TUP).
Figure 10: Name, macro, and button
1, Section 2 contains the area where we will create the macro. First I will introduce you to a few macro syntax names. Macros are a sequence of commands that will run a command at the command prompt. Do a test and look at the command line when you type tcase and select objects to change the case of text. The macro to change text from lower case to upper case reads as:
Let’s take a closer look at the code and use color and numbers to help us out with macros.
- The ^C^C represents a cancel of a command. Not only once but twice, because we all know in AutoCAD it takes 2 to cancel a command.
- The hyphen (-) suppresses the dialog box. We need to have the command be driven from the command line; bringing up a dialog box will halt the process.
- Launch the command from the command line.
- The semicolon represents pressing an enter or return on the keyboard.
- The forward slash represents a pause for user input. Note: When using macros to access a path to locate a file, you must reverse the slash in the path to represent the path.
- Another semicolon to hit a return on the keyboard.
- The u will tell the user that we are going to choose uppercase for our text.
- Finally, one more return to complete the command.
Figure 11: The macro, broken down
We have now entered our command name and macro. It’s time to choose and/or create our button.
2. In section 3 we are going to create our button. Still within the CUI, move over to the button section. You have more than 600 images to select from or you can start from scratch to create your button. Find one that looks like a piece of text. Keep in mind you can search for the change text command and find something similar, but make sure you save as a name or export the image and import back in when you need it.
For this example we are going to select an existing button and modify, then do a save. In the Save Image dialog box shown in Figure 12, type Text_Up in the name box and click OK. This image will be saved in the current customization file. It is good practice to export your image to a secure location. When you upgrade your software, your image will be available for import. Note: If you just edit an existing image and save, you will alter the original image that is connected to that command.
Figure 12: Button editor
We have our command name, macro, and button created. Now we just drag and add our new command to our AUGIWorld QAT as shown in Figure 13. Let’s take a closer look at the items we changed and/or added.
- Created a new button image
- Applied a macro using the tcase command to start
- Saved the new button image (and exported to a secure location).
- Named the new command TUP.
- Dragged the new command to our AUGIWorld Workspace.
HINT: If you want to learn more about macros join me at Autodesk University 2016 where I will be teaching a hands-on lab titled “Pumping up Productivity in the Lab with Macros, One Character at a Time.” Join me as we will explore how to modify old, create new, and have some fun with macros at #AU2016.
Figure 13: Let’s add a button
Macros can be very efficient in AutoCAD. Once you start looking at the CUI you will notice that many of the commands are driven by macros and the code is there for you to explore. The possibilities of you customizing the QAT to your needs have become a reality. The goal for many of us is to be quick while continuing to maintain quality in our design deliverable.
So, you ask, what is putting the Q in the QAT? The Q is quality; adding custom commands to the QAT is not only quick, but also provides a quality product and efficiency as we draft and design. Add your commonly used commands and custom commands to the QAT and work quicker while being productive. Take it one step further and link several QATs to different workspaces, providing you quick access to many different tools while working on different elements of the project. Everyone works differently; it’s up to you to put the Q in the QAT and make that toolbar work for you full-time.