Ready, Set, Action! Learn How to Create Action Macros in AutoCAD

Learning
action macros in AutoCAD

Action macros are a series of actions (commands) that you record and can be played back in an active drawing. You use the Action Recorder to save the commands as an action macro (.ACTM file). Using action macros can really increase productivity by automating repetitive tasks.

As you perform commands in a drawing, you record your steps as action macros. Then you can play the macros as needed to repeat the performed steps with minimal input. Using an action macro is just like typing in an AutoCAD command that you define and entering the name in the command line. Due to this functionality, it is crucial that you do not create an action macro with the same name as a default AutoCAD command.

Let’s take a look at the Action Recorder, how to create action macros, and some examples.

Action Recorder

So, where do you find the action recorder tools and settings? Navigate to the Ribbon: Manage tab > Action Recorder panel.

Action Recorder AutoCAD

You will notice that there is a big button to start the recording, and other tools that allow you to manage and play your action macros. As you create action macros, they will appear in the action macro drop-down.

action macro drop-down AutoCAD

As I always tell users, there is no “magic” when it comes to AutoCAD, there’s always a setting or file that it reads or locates AutoCAD resources. .ACTM files are stored in the following location and are accessed in the Options dialog box.

ACTM files AutoCAD

You will notice that there is an additional Action Recorder location that you can define for multiple locations. This allows you to place your .ACTM files on the server to share with all the users in your company. (Very cool!)

How to Create an Action Macro

Hmm, I wonder which button you hit first to start recording an action macro… Yep, it’s the BIG Record button in the Action Recorder panel.

While AutoCAD is recording, you can launch commands, enter values, and even select objects. The Action Recorder records standard commands from the command line as well as from the ribbon, the Properties palette, the Layer Properties Manager, and the tool palettes. That said, most dialog boxes are not recorded in the Action Recorder unless you use the command line equivalent of the dialog box setting; that would be entering a dash “-” before a command (e.g., -INSERT).

Once you start the Record process, try to do ONLY the commands that you need to do for the macro, including zooming. Remember, AutoCAD is recording EVERYTHING while you are “recording.”

When you start recording, you will notice that AutoCAD puts a record badge at your cursor, visually telling you that you are recording a macro. Also, the panel will expand to show you everything that you do in AutoCAD.

When you have completed the steps, click the Stop button to finish the recording. You will be prompted to give the macro a name. Remember, do not use a default AutoCAD command, as this will override that command. As a tip, I will either give the macro a prefix with my initials or the company.

Action Macro command name AutoCAD

Now, once the macro is saved, you will want to navigate to the commands in the Action Recorder panel. There you can edit certain locations in the macro to provide either a Pause for user input, to remove any accidental commands, or to insert a user message. To access those options, you simply right-click on any of the commands and choose from the context menu.

Action Recorder panel AutoCAD

And that’s it! All you have to do is type the command in the command line and you now have your own custom command.

custom command AutoCAD

Action Macro Examples

So, what are some examples of action macros? Actually, it’s really infinite as the action macro can be very elaborate or simple. That said, here are some examples of action macros that I use throughout the day.

Rotate the View to A User-Defined Rotation

This macro allows the user to rotate the view to a rotation defined by the user, and then sets the UCS back to World. Very useful in the civil realm.

rotate view action macro AutoCAD

My ATTSYNC Command

When re-defining attributes in a block, you have to run the ATTSYNC command, press “S,” select your block, and then press “Y” for yes. This macro, simplifies this process to two clicks.

ATTSYNC command AutoCAD

My PURGE

Purging can be straightforward, but this macro automates it completely. It also adds the purging of REGAPPS, which is not in the default PURGE command.

action macro PURGE command AutoCAD

And the list can go on and on. Now, go create your own macros!

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

______
icon-svg-close-thick

Cookie preferences

Your privacy is important to us and so is an optimal experience. To help us customize information and build applications, we collect data about your use of this site.

May we collect and use your data?

Learn more about the Third Party Services we use and our Privacy Statement.

Strictly necessary – required for our site to work and to provide services to you

These cookies allow us to record your preferences or login information, respond to your requests or fulfill items in your shopping cart.

Improve your experience – allows us to show you what is relevant to you

These cookies enable us to provide enhanced functionality and personalization. They may be set by us or by third party providers whose services we use to deliver information and experiences tailored to you. If you do not allow these cookies, some or all of these services may not be available for you.

Customize your advertising – permits us to offer targeted advertising to you

These cookies collect data about you based on your activities and interests in order to show you relevant ads and to track effectiveness. By collecting this data, the ads you see will be more tailored to your interests. If you do not allow these cookies, you will experience less targeted advertising.

icon-svg-close-thick

THIRD PARTY SERVICES

Learn more about the Third-Party Services we use in each category, and how we use the data we collect from you online.

icon-svg-hide-thick

icon-svg-show-thick

Strictly necessary – required for our site to work and to provide services to you

Qualtrics
W
Akamai mPulse
W
Digital River
W
Dynatrace
W
Khoros
W
Launch Darkly
W
New Relic
W
Salesforce Live Agent
W
Wistia
W
Tealium
W
Upsellit
W
CJ Affiliates
W
Commission Factory
W
Google Analytics (Strictly Necessary)
W
Typepad Stats
W
Geo Targetly
W
SpeedCurve
W
Qualified
#

icon-svg-hide-thick

icon-svg-show-thick

Improve your experience – allows us to show you what is relevant to you

Google Optimize
W
ClickTale
W
OneSignal
W
Optimizely
W
Amplitude
W
Snowplow
W
UserVoice
W
Clearbit
#
YouTube
#

icon-svg-hide-thick

icon-svg-show-thick

Customize your advertising – permits us to offer targeted advertising to you

Adobe Analytics
W
Google Analytics (Web Analytics)
W
AdWords
W
Marketo
W
Doubleclick
W
HubSpot
W
Twitter
W
Facebook
W
LinkedIn
W
Yahoo! Japan
W
Naver
W
Quantcast
W
Call Tracking
W
Wunderkind
W
ADC Media
W
AgrantSEM
W
Bidtellect
W
Bing
W
G2Crowd
W
NMPI Display
W
VK
W
Adobe Target
W
Google Analytics (Advertising)
W
Trendkite
W
Hotjar
W
6 Sense
W
Terminus
W
StackAdapt
W
The Trade Desk
W
RollWorks
W

Are you sure you want a less customized experience?

We can access your data only if you select "yes" for the categories on the previous screen. This lets us tailor our marketing so that it's more relevant for you. You can change your settings at any time by visiting our privacy statement

Your experience. Your choice.

We care about your privacy. The data we collect helps us understand how you use our products, what information you might be interested in, and what we can improve to make your engagement with Autodesk more rewarding.

May we collect and use your data to tailor your experience?

Explore the benefits of a customized experience by managing your privacy settings for this site or visit our Privacy Statement to learn more about your options.