Chapter 30. Creating Macros and Slide Shows with Script Files
IN THIS CHAPTER
Automating commands with script files
Creating 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.
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 a menu item or toolbar button instead. Chapter 29 explains how to customize toolbars, and Chapter 33 explains how to customize 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).
Creating the script file
You can create the script file using a text editor, such as Notepad. For early practice with script files, type each command on its own line. A blank space is equivalent to pressing Enter. ...
Get AutoCAD® 2008 and AutoCAD LT® 2008 Bible now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.