Presentation on theme: "CP308-1L: Working with Actions and the Action Recorder Lee Ambrosius Autodesk, Inc Sr. Technical Writer."— Presentation transcript:
CP308-1L: Working with Actions and the Action Recorder Lee Ambrosius Autodesk, Inc Sr. Technical Writer
Where Am I and Who Should Be Here You are in session: CP308-1L - Working with Actions and the Action Recorder Do you have repetitive tasks you want to automate in AutoCAD? If so, you are in the right place. You should know or have the following to get the most out of this session: Experience with AutoCAD 2010 or are moving to AutoCAD 2010 Can create and modify objects in AutoCAD Do not need any programming experience
Overview AutoCAD ships with a wide range of number of commands for: 2D drafting 3D modeling File management However, it does not always contain every command that might make you productive. Questions: Have you customized AutoCAD before? Have you used (or tried to use) one of the programming languages or platforms that AutoCAD supports?
Who Am I? My name is Lee Ambrosius Started with AutoCAD R12 DOS, over 15 years ago Technical Writer at Autodesk for AutoCAD and AutoCAD LT (Worked on Action Recorder and.NET Developer’s Guide) Author of AutoCAD related books and articles AutoCAD 2009 and AutoCAD LT 2009 All-in-one Desk Reference for Dummies AutoCAD D Modeling Workbook for Dummies AUGI World and AUGI Hotnews White Papers for Autodesk
Who Are the Lab Assistants and How to Get Their Attention? Andrew Hill – AEC Systems Matt Murphy– 4D Technologies Jon Rizzo– Langan Engineering Labs are typically somewhat fast paced, so please do not get discouraged if you get behind. If you get stuck at some point in the lab, raise your hand and one of the excellent lab assistants will come to your aide.
Session Rules A few rules for this session: Turn off or set your cell phone to vibrate Use the computers only for completing the lab If you have to leave at anytime, please do so quietly I will allow time to ask questions during the session As a reminder, raise your hand if you get stuck Thanks for Your Cooperation
What is Going to be Covered Introduction to the Action Recorder What are action macro files and where are they located What actions can be recorded Record, save, and playing back action macros Modify a saved action macro Create simple and advanced action macros Understand how to share an action macro with others Where to get more information on the Action Recorder
Action Recorder Panel on the ribbon Allows you to create, modify, manage, and play back action macro (ACTM) files Divided into two different parts/areas Top area – Provides access to general tools for working with action macro files Bottom (expanded) area – Provides to the Action tree which allows you to work with specific actions in an action macro
Storing Action Macro Files AutoCAD looks in two places for action macro (ACTM) files. These locations are defined in the Options dialog box. Files tab, Action Recorder Settings Actions Recording File Locations – Specifies the location used to store newly recorded ACTM files Additional Actions Reading File Locations – Specifies the location of additional ACTM files that can be played back Exercise: E1 - Set the File Location for Action Macro Files
What Are Actions and What Can Be Recorded Actions are the smallest tasks that you can record. An action can be a command, the displaying of a dialog box, or input that is entered at the Command prompt. Some of the actions that you can record are: Commands started from a user interface element Tools on a tool palette Blocks and xrefs inserted from the DesignCenter Property changes made with the Properties palette or Quick Properties panel Commands and input entered at the Command prompt
What Should Be Avoided and Cannot Be Recorded Commands that display a dialog box should be avoided For example, instead of using the ARRAY command you should use the command line equivalent of -ARRAY. Grip editing are not recorded Drawing file operations (open, create, or close) are not recorded There are additional commands and situations that should be avoided. These can be found in the Help documents under “Tips for Using the Action Recorder” in the AutoCAD Customization Guide.
Recording Actions Before you start recording an action macro, you should think about which commands and the input you will be using. After that, you can begin recording your action macro. Making sure you know what you want to record will help reduce the number of times it might take to get the action macro recorded. Exercise: E2 - Prepping to Record an Action Macro
Recording Actions To begin recording, click Record on the Action Recorder. While recording, any actions started or input entered are captured in the Action tree. To end recording, click Stop. After recording is stopped, you are prompted to save the new action macro. Exercise: E3 - Record an Action Macro Exercise: E4 - Save a Recorded Action Macro
Play Back an Action Macro Once an action macro is saved, it can be played back. Playing back an action macro is similar to starting a standard command. You can play back an action macro by: Entering the name of the action macro at the Command prompt Clicking the action macro from the Action Macros list on Action Recorder panel and clicking Play Exercise: E5 - Play Back a Recorded Action Macro
Manage Action Macro Files You can manage action macro files by: Right-clicking the top node in the Action tree Using the Action Macro Manager (New in AutoCAD 2010) Windows Explorer You can manage action macro files in the following ways: Create a copy of an action macro file Delete an action macro file that might no longer be needed Edit the properties of an action macro file Move an action macro file (Windows Explorer only)
Manage Actions The Action tree allows you to modify the actions in an action macro in the following ways: Delete an action Edit a recorded value Insert user messages Request a new value or define a base point for the action macro to use during play back Exercise: E6 - Add a User Message Exercise: E7 - Add a Pause for User Input
Putting Multiple Actions Together Creating a layer is nice, but action macros can do much more. You can: Insert blocks and use tools from tool palettes Modify the properties of objects using the Properties palette Use custom commands defined by AutoLISP routines Exercise: E8 - Controlling the Insertion
Sharing an Action Macro Action macros can be shared with other users. However, there are a few things to be aware of first. If you use a commands like -INSERT or -XREF, be sure to share the files being referenced by the commands. If you use custom commands defined in an add-on or AutoLISP file, it will need to be available and loaded on the other computers. Shared action macro files need to be placed in the folders defined by Actions Recording File Locations or Additional Actions Reading File Locations in the Options dialog box. Otherwise, AutoCAD will not load and make them available for use.
Additional Exercises/Examples With time permitting, give the following exercises/examples a try: Exercise: E9 - Using Custom Commands Exercise: E10 - Create a Rectangular Revision Cloud
Where to Get More Information Learning a feature can be a challenge, but you do not have to go it alone. The following are only but only a few resources that you can use after leaving here: Help system in AutoCAD AUGI Forums (www.augi.com) Autodesk Discussion Forums (www.autodesk.com) Industry Events/Classes (AU, AUGI CAD Camp and ATCs) Tutorials (www.autodesk.com/autocad-tutorials)
Final Questions Questions Going Once… Going Twice…
Closing Remarks Thanks for choosing this session, and do not forget to fill out the evaluation for this session If you have any further questions, I will be around for the week and can be reached at: Enjoy the rest of the conference.