Chapter 30: Creating Macros and Slide Shows

In This Chapter

Automating commands with script files Recording macros Creating and viewing slide shows Creating slide libraries for menu customization

Script files are like macros that you create in your word processor or spreadsheet. They automatically execute a series of commands. You can use script files to automate plotting, set up a drawing, clean up a drawing, create a slide show, or do any repetitive task. By running a script file on a number of drawings, you can complete a time-consuming task in a fraction of the time.

You can also record actions on-screen and save them as a macro. Doing so saves you the time of figuring out the exact command-line sequences.

If you need to put together just a few commands that you might use another time for other drawings, you may want to consider creating either a menu item, or a toolbar or ribbon button. Chapter 29 explains how to customize toolbars, and Chapter 33 explains how to customize the ribbon and menus.

Creating Macros with Script Files

A script file contains a list of commands and options. To create a script file, you need to think out the commands that you want to execute, as well as their options and prompts. Then you create the text for the script file. Script files have the following characteristics:

They must use the .scr filename extension.

They are text-only (ASCII) files.

They must use command-line syntax only (which can include AutoLISP expressions if you are creating ...

Get AutoCAD® 2012 & AutoCAD LT® 2012 Bible now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.