Rockin’ It Old School With the AutoCAD Command Line: Tuesday Tips With Frank

Learning
AutoCAD Command Line

Over the years, AutoCAD has evolved its user interface to the point that some modern users argue that the Command Line is no longer necessary. This tip attempts to rebuke that by showing where old school methods may still be the best.

Many commands have a Command Line version. Just add a dash to the front of the command name to access them. Here are a few examples:

AutoCAD Command Line

The Power Is in the Wildcards

Just being able to access these on the Command Line doesn’t really help you much though. It’s more typing, manual data entry, proper syntax; in other words, no productivity gains at all (and possibly just the opposite).

The real power comes with using wildcards. Wildcards are special characters that can represent one or more characters in a text string. Below is a table that identifies the characters that AutoCAD recognizes, and what each one does.

AutoCAD Command Line

Let’s look at a few ways of how you can use some of these wildcards in your commands:

-XREF B *

Quickly Bind all the XREFs in your drawing (you could easily do the same with Unload, Reload, or Detach)

-XREF U *ABC*

Here we’re unloading only the drawings with ABC somewhere in the name

-PURGE B ~XYZ Y

Purge only the blocks that do not have XYZ in their name.

-LAYER C 9 WEST*|A-*

This last example is a little more complicated. Here, we’re setting any Architectural Xref dependent layer (note the use of the vertical bar) whose name starts with WEST to be color 9.

The first few examples are rather simple but may offer a more efficient way of performing the task. The final example is a lot more powerful. There are many ways to use command line versions in conjunction with wildcards to speed up tasks that modern interfaces may slow down.

Bonus tip: Wildcard characters can be used in other places in AutoCAD, such as Find and Replace and Quick Select.

Summing Up

While, yes, I do go back to those days when issuing commands via the Command Line was necessary knowledge, don’t get me wrong, I am a huge fan of the GUI improvements that have gotten us to the latest release. My last tip should be proof of that.

But the next time you’re struggling getting one of the new, sleek palettes set up to your liking, you might try rockin’ it old school with the Command Line. It’s not something you’ll do all the time, but when you need it, you’ll be glad you know how.

More Tuesday Tips

Check next week for another entry in our Tuesday Tips series.



Frank Mayfield

Frank has worked in various design and CAD Management roles with AutoCAD and Autodesk software since 1986 (v2.62). He is currently a Design Technology Consultant in Tulsa, OK. He also serves as Vice President on the AUGI Board of Directors and is a member of numerous Autodesk user panels. As a top-rated mentor for trial users of AutoCAD 2018 and AutoCAD LT 2018, he has provided live, real-time guidance and support for over 2,500 new users in more than 50 countries worldwide. He currently serves on the AUGI Board of Directors and is a member of numerous Autodesk user panels.

Try AutoCAD free for 15 days
The AutoCAD Blog is all about helping you get the most out of AutoCAD. It's also the best way for you to connect with the makers of AutoCAD. Subscribe to keep up with AutoCAD