AutoCAD 2002 Bible

Скачать в pdf «AutoCAD 2002 Bible»

Remember, you can open Notepad from within AutoCAD by typing Notepad at the command line. At the File to edit: prompt, press Enter to open a new file. The acad.pgp file includes this Windows command by default. See Chapter 29 for details on the acad.pgp file.

Another option is to simply write down what you type at the command line. As you write, use an underscore to represent each space. It’s very hard to remember that you left three spaces between two words unless you see three underscores. Of course, when you create the script file, you must use spaces, not underscores.

Once you complete the script file, save it with any name that is meaningful to you plus an extension of .scr.

Here’s an example of a script file that draws a series of circles:

circle 2,2 1.5 circle 6,2 1.5 circle 10,2 1.5 circle 14,2 1.5

This script file starts the CIRCLE command, specifies a center point, and specifies a radius four times. The results are shown in Figure 30-1.

Figure 30-1: This drawing was created by running a script file.

Running script files

You can run a script file from within a drawing. Use this technique when you want the script to apply only to that drawing. You can also run a script file when loading AutoCAD. You would do this when you want the script file to apply to more than one drawing. For example, you could use script files in the following situations:

♦    You want to use a script file to set up every drawing you open. Although the script file applies to only one drawing at a time, you use it on a different drawing each time.

Скачать в pdf «AutoCAD 2002 Bible»