CADTutor: The best free help for AutoCAD on the web

Michael BeallMichael’s Corner #143
December/January 2016

Automate it!

by Michael Beall

I'm sure I've forgotten more than I remember at my age, so coming up with one-click solutions is always at the top of my list. After training the daylights out of something, I usually try to figure out how we can automate it.

And although I'm not presenting at Autodesk University this year, I hope those of you who are able to attend are having (or had) a wonderful and educational experience, as it always is.

So here are a few things you may be interested in as the year winds down or as you're looking forward to the surprises in store this new year!

…Automating the Settings feature for Select Similar
…Restoring a Layer State from the Quick Access Toolbar
…Accessing commands from another Workspace
…Restoring the original value of a Dimension

Wishing one and all a very Merry Christmas and a Happy New Year! Make a snow man — or a sand castle if that's more in keeping with your part of the world — and smile often… it'll make people wonder what you're up to!

If you would like to contact me directly, you can do that also.

Blessings to one and all,

Select Similar Drop-down on the Quick Access Toolbar

I was hoping A2016 would have fixed this oversight, but the Select Similar command [Selectsimilar] has a SEttings option that can ONLY be accessed if you type(!) the command. [See Michael's Corner from August 2012 for a review of this feature]. In other words, there's no flyout shortcut menu. So I figured we could just put something up on the Quick Access Toolbar to cover both bases.

How to Create a Drop-down for ‘Select Similar’

  1. Type CUI, then press [Enter] to open the Customize User Interface.

  2. Under Customization in All Files, expand Quick Access Toolbars.

  3. Right-click on Quick Access Toolbar 1, then click New Drop-down. Enter a name for the drop-down. Mine is Select Similar.

  4. Under Command list, in the Search Command List field, enter ‘similar’ to isolate commands containing that word.

  5. Right-click on the Select Similar command, then click Duplicate. The copy is now highlighted thereby retaining the integrity of the original command. This will be the one we edit to run the Settings option.

  6. Properties Panel

    Modify the Name, Description, and Macro as shown in the figure. The macro reads (not case-sensitive):


  7. Command ListTo change the look of the button, under Button Image, click Edit to open the Button Editor. Turn on the Grid and make a few changes to distinguish this one from the default Select Similar button.

  8. After editing your button, click Save and enter a name for the button, then Close the Button Editor.

    At this point, you now have two commands in the command list; Select Similar, and Select Similar — Settings.

  9. Drag and dropTo add these commands to your new Drop-down menu, drag each command from the Command List, up to the Quick Access Toolbar list and release each one next to the NAME of your new drop-down (Select Similar), not Primary Command.

    After you release the command next to the name of the drop-down, the command will appear below Primary Command. I know, very curious.

  10. Click OK to save your edits and close the CUI.

Now, next time you get ‘unexpected results’ from the Select Similar command, simply go up and change the Settings!

Top of page

Power Tool

Layer State on the Quick Access Toolbar

The Layer States pulldown menu was moved to the expanded Layers panel beginning in AutoCAD 2015, so that means an extra click to get to the list in a timely manner. Sounds like we need a button!

Prerequisite: Thaw, turn On, and Unlock all the layers in the drawing, then create a layer state called "ALL LAYERS". [For more on Layer State fundamentals, see Michael's Corner February 2007]

How to Restore the ALL_LAYERS Layer State from the QAT

  1. Launch the CUI, then expand Quick Access Toolbars, then Quick Access Toolbars 1 to display the current content of the QAT.

  2. Under the Command List, navigate to Layer State Manager, then right-click on it and click Duplicate. The highlighted command is the copy, so we can edit that one.


  3. Under Properties, give the button a Name and a Description similar to that shown. The description is essentially the ‘Tool tip’.

  4. In the Macro, delete what's there, then enter the following:

    ^C^C-LA;A;R;"ALL LAYERS";;;

    Here's what the Command String means:

    ^C^C Cancel; essentially hits the ESC key
    -LA Launches the command line version of the Layer command.
    ; Press <Enter>
    A The Layer StAte option of the Layer command
    R The Restore option

    Note: Since pressing the spacebar is the equivalent of pressing [Enter] on the keyboard, if your layer state name has a space in it — as in our example of ALL LAYERS — the quotes will force AutoCAD to read the entire name of the layer state.

  5. To modify the button image, click Edit to open the Button Editor.

    Button image

  6. After making the desired edits, click Save, then name this button image All Layers Button, then OK. Click Close to close the Button Editor. In the Command list, you will see your new command Layer State: All layers.

  7. Drag and dropTo add it to the Quick Access Toolbar, drag your command up into the list of commands under the Quick Access Toolbar 1 header, as shown in the figure.

  8. Click OK to apply your changes and close the CUI.

To test your button, you may want to turn some layers On/Off or restore a different layer state, then try it.


What if you don't have a layer state named All Layers but you want to turn see all the layers of your drawing?

Replace the above button Macro with the following:


This routine will Thaw any layers that are Frozen, then turn ON any layers that are OFF. Hopefully you're seeing a pattern here and may have some ideas on other buttons you can make to automate those pesky layer tasks!

Top of page

The Odd Spot

Ground Shadows to the QAT

Back in Michael's Corner, May 2013, I covered the very nice feature called Ground Shadow. Well, they moved it.

Ground ShadowsI'll tell you where it is, but before you go there, you'll want to save your current Workspace — Workspace SwitchingSave Current As. (Workspaces were covered in May 2009, if you missed it.)

Now go to the 3D Modeling workspaceVisualize tab. On the Lights panel, right-click on Ground Shadows, then Add to Quick Access Toolbar.

Next time, we'll cover how to copy a command from one Workspace to another. It's easier than you would think!

Top of page

The Basics

Original Dimension Value

Since the dimension text of an associative dimension is Mtext, double-click anywhere on an associative dimension and you can add additional information… or modify the value to what you want.

Dimension 1

But what if you want to put the dimension back to the original value?

If you reposition an extension line origin grip of a dimension and the value doesn't change, the original value was modified.

If you double-click a dimension and the edit box has a white background — not blue — the original value was modified.

Dimension 2

Double-click the dimension, then put the less-than and greater-than characters in the dimension box, like this… <>

The original value will be restored.

Top of page

Left Field

All Things Autodesk®: December is all about Autodesk University in Las Vegas, so I thought it would be fun to post a few trivia sites that you can go to while you sit on the floor, waiting outside your venue at the Venetian. (Yep, been there, did that).

Autodesk Trivia from John Walker, founder of Autodesk

How Autodesk Came to Be

Shaan Hurley's Autodesk History (Just about anything on Shaan's site is good stuff; bookmark it)

…play safe!!

Share this page:

Share at Facebook Submit a link at Reddit Share at StumbleUpon Share at Share at Technorati

Local Navigation

Sponsored Links

Accessibility statement

Valid XHTML 1.0!Valid CSS!Creative Commons Licence