Categories

AutoCAD 2015 and AutoCAD LT 2015 Bible

The most comprehensive AutoCAD book around!

Tutorial-How to display the area of an enclosed figure

Suppose that you would like to insert a label that displays the area of an enclosed figure. While the AREA command can show you the area, it doesn’t create a label in your drawing. If you insert the area at the end of a leader, that area doesn’t change if your object changes in size.

You can use fields (introduced in AutoCAD 2006) to display information about objects. In this tutorial, you create a leader that displays the area of a tub. You can do this in model space or paper space.


  1. Set up a text style for your leader text and a dimension style for the leader.
  2. Start the MLEADER or QLEADER command.
  3. Specify the first leader points and subsequent points until you see a text cursor.
  4. If you’re using the QLEADER command, At the Specify text width <0″>: prompt, specify the endpoint of the text, leaving enough room for the expected text. At the Enter first line of annotation text <Mtext>: prompt, press Enter to open the Multiline Text Editor, as shown here.

Tips from our reader: To get rid of the text box gray hatch,  use Tools -> Options -> User Preferences and uncheck “Display background of fields” under “Fields”

  1. For either command, when you see the text cursor, type Area: and a space.
  2. Right-click in the text area and choose Insert Field.
  3. In the Field dialog box, choose Objects from the Field Category drop-down list. This makes the field you want easier to find.
  4. Choose Object in the Field Names box.
  5. In the Object Type area, click the Select Objects button.
  6. You return to your drawing, where you should select the object. The Field dialog box comes back and it should look like the one you see here.

Note: If your enclosed area isn’t one object, you may be able to use the BOUNDARY command to create a polyline. That’s what I did with the tub.

  1. Choose the property you want to display. I chose Area.
  2. Choose a format; I chose Architectural.
  3. Click OK.
  4. If necessary, adjust the width of the text by dragging on the edge of the Multiline Text Editor’s ruler.
  5. Click outside the editor to close it. Here you see the result.

Want more productivity tips like this? You can draw and edit faster and easier with this easy to follow top 25 productivity tips every AutoCAD user should know.

3D Model in AutoCad – Using Revolve 3D Tool

3D model AutoCad - 3D screw

The revolve command or tool is a 3D modeling method that enables the user to create a solid following a certain path with a central axis, think of the ARRAY tool, only in three-dimension.

Let’s start by preparing the drawing by specifying crucial dimensions such as the inner and outer diameter of the threaded screw. Prepare the cross-section as well.

1. Open a new drawing. Insert the plan into the top view and cross-section. Make sure they are closed polylines and note the centerline or reference point for the object.
2. Switch to Elevation (Front) then adapt the UCS to snap the section into the inner diameter.
3. From there switch to 3d Isometric. Use the REVOLVE command. Click the Polyline (Elevation). Then trace the direction of the parallel axis line (vertical or horizontal) in the center. Enter 360 as the value of rotation. You now have a complete screw
4. Note that, the parts where there are hexagonal washers, we can trim it by switching to the UCS parallel to the head of the screw and subtract excess from the circle.

You can also do the hexagonal solids separately then assemble and combine it. That’s it! Your 3d screw is now complete.

For more drawings that you can use to practice your skills, be sure to check out our previous AutoCad 3D modelling step by step tutorial to draw a 3D piston and this e-book with 101 CAD Exercises – Learn & Improve Your Skills.

Any questions about this tutorial? Do you have any tips to help make this tutorial easier? Did you find this tutorial helpful? Leave a comment! And please share the knowledge using the Share buttons below!


Tutorials: How to Copy Objects Between Drawings

Updated with AutoCAD 2017

Copying objects from one drawing to another is a common task. You can use the Windows Clipboard and the drag-and-drop methods.

When working with 2 drawings open, choose View tab> Windows panel> Tile Vertically (or Horizontally) to view both drawings at the same time.

Note 1 : You can use these techniques within a drawing as well, but the COPY command provides more options and accuracy.

Note 2: You may need to clear your clipboard if having problem pasting latest copied object. (Right click on Desktop – Display setting – Clipboard)



Use the Windows Clipboard to copy objects between drawings

Most people know that they can copy objects in a drawing to the Windows Clipboard and then paste those objects in another drawing. But there are a couple of tricks to this process that can make your work go more quickly and provide more accurate results.

Of course, you can use the common Windows keyboard shortcuts:

  • Ctrl+C to copy
  • Ctrl+V to paste

When you use the simple copy-and-paste procedure, you don’t have much control over the placement of your object in the second drawing. That’s because this process uses the lower-left corner of the extents of the object as the base point, which may not be useful. For example, here you see this process with a circle.

As you can see, the base point isn’t on the circle, making it difficult to place the circle accurately.

Therefore, AutoCAD provides you with 2 special tools for copying and pasting.

The first is Copy with Basepoint. Follow these steps:

  • Hover the cursor over the object and right-click to display the shortcut menu. For multiple objects, select them first, and then right-click.

  • Choose (Clipboard,) Copy with Base Point. This is the COPYBASE command. As you can see in the figure, you can also press Ctrl+Shift+C.
  • At the Specify base point: prompt, use an object snap to specify the base point.
  • Click in the other drawing.
  • Paste, using Ctrl+V, or by clicking Paste on the Standard toolbar. You can also right-click and choose (Clipboard,) Paste from the shortcut menu.
  • Your cursor is now at the base point you specified, so you can accurately place the object. Specify the insertion point you want.

Here, the base point was set to the center of the circle.

## Dynamic block is another great productivity tip to master. Sign up below to get your Free tutorial on creating a complete dynamic block, including a drawing to practice on. You’ll make a movable chair, resizable desk, and more.

The 2nd useful tool is Paste to Original Coordinates. If you have two drawings that are very similar, you can use this feature to place the object at the same coordinates as in the original drawing.

Just copy the object(s) to the Clipboard, and activate the 2nd drawing. Then right-click and choose (Clipboard,) Paste to Original Coordinates.

If those coordinates are not in the current display, do a Zoom Extents to see the pasted object.

Note: We receive few comments that “Paste to Original Coordinates” may not work on Mac computer. One of our followers (Thanks @Chilli ) provided the following work around. 

If you do not have the Clipboard menu option of ‘pasting to original coordinates’, simply follow these steps.

1. Select elements in the proposed property drawing.
2. Right click – clipboard>Copy with base point
3. Type in 0,0
4. Switch to destination drawing
5. Right-click on open area>clipboard>paste with base point
6. Type in 0,0

And if the coordinate system is the same in both drawings, your elements should be located correctly.

Use drag-and-drop to copy objects between drawings

Drag-and-drop doesn’t give you the same control over placement, but it’s a quick way to copy objects. Note that AutoCAD automatically copies objects from drawing to drawing, so that you don’t need to press Ctrl as you drag.

To copy, select the object or objects. Then click the object and hold down the mouse button until you see the drag-and-drop cursor. The only gotcha is that you need to make sure that you don’t click on a grip, because that will just make the grip hot.

Then drag the cursor to the other drawing and release the mouse button to place the object. You’ll probably need to adjust the placement, using the MOVE command, or by using grip-editing.

Want more productivity tips like this? You can draw and edit faster and easier with this easy to follow top 25 productivity tips every AutoCAD user should know.

Top Six solutions to common XREF problems

Xrefs (external references) let you view another drawing within your current drawing without actually inserting that other drawing thus keeping the original drawing size manageable.

Another benefit of using Xref is that changes made to the referenced drawings are automatically reflected in the current drawing when it’s opened or if the xref is reloaded. This will significantly reduce drafting time as well as minimize mistakes.

When working with external references in AutoCad, you may experience some difficulties and problems. Since XREF is one of the most common functions in AutoCad drafting, let’s look into each of these problems and more importantly the easy solutions to these six common Xref problems:

1. Deleting an XREF

To delete an existing XREF, first make sure that there are no objects in the layer. It is also not possible to delete the current layer, Layer 0, Defpoints and XREF dependent layers. Input the LAYDEL command to delete specific layers within the drawing. Type in LAYDEL, then press, Enter. You will be prompted to either SELECT the object or delete by choosing the NAME layer.

2. Exploding an XREF

To successfully export a cad file without the XREF, you will need to BIND the XREF to the drawing. By typing BIND and selecting the XREF, you will be able to convert the XREF to block. The only downside here is that any changes you wish to make in the main XREF file won’t affect the current XREF block. BIND lets the existing XREF to inherit characteristics of a typical BLOCK enabling you to explode it.

3. Change XREF color, set layers to 0

If you are looking to change the layer, line weight, and color of a referenced file without turning it into a block or editing the whole file, you can use VISRETAIN. Access the main XREF file and type in VISRETAIN. Enter values as desired (VISRETAIN=0 means that you can configure the properties of the drawing while setting it to VISRETAIN=1 means it retains its settings same as the mother file no matter what).

Another option is changing the xref’s layers color in Layer Properties Manager. This allow customization of each layer of the main xref file – not limited to colors but also linetypes etc. For additional productivity tips to work more effectively with layers, check out our blog – Tips for working with layers.

4. Detach and XREF File (and all at once)

To detach a specific file from the current drawing file, access External References from the VIEW tab or type XREF on the command line, hit Enter. From the XREF panel, select a drawing reference, right-click. A list of options will appear from the cursor, select Detach from the menu.
In the cases of having a lot of XREF to detach, such in the cases of big projects, you may opt to detach the files altogether with one click. To be able to do so, you need to UNLOAD THE file and hold the shift key down while selecting the XREFs to be deleted. See here:

5. Setting the same measurement units for the XREF File and current drawing

Enter INSUNITS in the command bar and turn it to zero, this makes your XREF unitless (by default, 1- imperial ; 4- metric). Set values for your INSUNITSDEFSOURCE and INSUNITSDEFTARGET to 0 as to make both the source file and destination file both unitless.

6. Toggle XREF Snapping

Turning the snap on a referenced drawing is possible though not usually recommended. By moving the XREF to defpoints and freeze layer 0, you will turn the XREF to an overlay on the background and render it unusable for snap and selection. To regain its previous functions, just thaw the layer and it will be usable again.

What are your top Xref problems? Do you have other Xref related issues  and solutions you want to share?

Want more productivity tips like this? You can draw and edit faster and easier with this easy to follow top 25 productivity tips every AutoCAD user should know.

Display lost toolbars in AutoCAD

Sometimes people have trouble displaying a toolbar that isn’t visible, or a toolbar seems to disappear for no apparent reason. Here are some tips for displaying toolbars.

1st method

The easiest way to display a toolbar is to right-click any visible toolbar. This displays the list of all your toolbars, as you see here on the right. Just pick the one you want to make it visible.

However, certain custom toolbars, and the Express Toolbars aren’t listed. To find them, right-click any blank (gray) area next to a toolbar. Click ACAD to find the same toolbars you’d get by right-clicking a displayed toolbar.

Tips: If all your menu has disappeared, quickest thing to try out first is to use MENULOAD command to reload the menu. Also make sure to Choose Classic as the workspace



2nd method

If you know the name of the toolbar, another option is to use the command line form of the TOOLBAR command, by typing -toolbar. At the resulting prompt, enter the name of the toolbar. Then, at the Enter an option: prompt, press Enter to show the default option, which is Show. Here’s what it looks like:

Command: -toolbar
Enter toolbar name or [ALL]: dimension
Enter an option [Show/Hide/Left/Right/Top/Bottom/Float] <Show>:

## Dynamic block is another great productivity tip to master. Sign up below to get your Free tutorial on creating a complete dynamic block, including a drawing to practice on. You’ll make a movable chair, resizable desk, and more.

3rd method

An alternative is to choose View> Toolbars. Starting with AutoCAD 2006, this opens the Customize User Interface (CUI) dialog box.

As you can see, the On By Default value is Hide. Click to reveal a drop-down arrow, and choose Show to display that toolbar by default.

4th method

An excellent way to control the display of toolbars is with workspaces. You can create a workspace that displays any set of menus, toolbars, and palettes (called dockable windows in the CUI dialog box). You can do this in 2 ways.

Display the toolbars that you want. In the Workspaces toolbar, choose Save Current As from the drop-down list. Enter a name and choose Save. Now, you can choose that workspace any time you want it from the Workspace toolbar (assuming you can find the Workspace toolbar!).

You can also create a workspace in the CUI dialog box. Right-click the Workspaces node and choose New> Workspace. Then type the name of the workspace. Click the Customize Workspace button. What this does is add a checkbox next to all the items on the left. Then you check what you want and uncheck what you don’t want. For each item, you can specify its properties, such as Docked or Floating. Finally, click Done.

Finding lost toolbars

Toolbars can sometimes get “lost” due to a change in screen resolution. If you recently changed the resolution of your screen, try a higher resolution, which will show more items at the edge.

You can protect toolbars from moving by locking their position. Right-click any toolbar and choose Lock Location. Then choose Floating Toolbars to lock those that aren’t docked, Docked Toolbars, or All.

Do you want more productivity tips to help you Draw and Edit faster and easier? Check out “Top Productivity Tips Every AutoCAD User Should Know

Rotate One Object to Match Another

Sometimes you need to rotate a block or object to match the angle of an existing object. Here’s one way to accomplish that, using the Reference option of the ROTATE command.

In this example, you want to rotate the desk to match the rotation of the end wall. Follow these steps:

  • Start the ROTATE command and select the objects that you want to rotate.
  • At the Specify base point: prompt, specify the base point of the object you want to reference to, not the base point of the object you want to rotate. This is point 1 in the above figure.
  • At the Specify rotation angle or [Reference]: prompt, choose the Reference option.
  • At the Specify the reference angle <0>: prompt, pick the point on the object that you want to rotate that corresponds to the base point you just specified. This is point 2 in the figure.
  • At the Specify second point: prompt, pick the second point that, together with the previous point, specifies the angle of the object that you want to rotate. This is point 3 in the figure. Notice the rubber band line from your base point (point 1) connecting to your object as you move the cursor, as shown below:

  • At the Specify the new angle: prompt, pick the point on the reference object that, together with its base point, specifies the angle of the reference object. This is point 4 in the first figure.

## Dynamic block is another great productivity tip to master. Sign up below to get your Free tutorial on creating a complete dynamic block, including a drawing to practice on. You’ll make a movable chair, resizable desk, and more.

Sanjay Kulkarni suggests another way to use the Reference option of the ROTATE command and end up with the same result. Sanjay is a technical writer, CAD trainer & programmer, and consultant based in Pune, India.

Use Reference option of ROTATE command

  • Start the ROTATE command and select the objects that you want to rotate.
  • At the Specify base point: prompt, specify the base point of the object that you want to rotate. In the top image, that would be point 2.
  • At the Specify rotation angle or [Reference]: prompt, choose the Reference option.
  • At the Specify the reference angle <0>: prompt, pick the point on the object that you want to rotate that corresponds to the base point you just specified. This is point 2 in the figure. So you’re picking point 2 again.
  • At the Specify second point: prompt, pick the second point that, together with the previous point, specifies the angle of the object that you want to rotate. This is point 3 in the figure.
  • At the Specify the new angle: prompt, choose the Parallel object snap. (Shift + right-click and choose Parallel) This OSNAP works in an interesting way, something like acquiring a tracking point. Move the cursor over the line you want to align to, in this case the line from points 1 to 4. Then move the cursor around to rotate the desk until you see a dotted extension line. You’ll feel the desk “snap” along that line. Then click to complete the ROTATE command.

New Update – Use ALIGN command

A few of you commented that ALIGN command is a more intuitive option, with less steps to achieve the same result. And you do not need to reposition the object. With ALIGN command, remember that “Source” is the object, “Destination” is the reference line.

  • Type in ALIGN command and select the object that you want to rotate.
  • At Specify first source point: Click the base point of the object that you want to rotate.
  • Then select first destination point, which can be at any point of the reference line of which you wish the object to align to.
  • Repeat and specify second source point: click the end point of the object you wish to rotate.
  • At specify second destination point, click another point along the reference line.
  • Then select CONTINUE. And as we do not wish to change the scale of the object with this example, select NO then ENTER

Trim the circle in half and use PEDIT

Jon e-mailed me with the following additional solution: If you use a circle and trim it in half, pedit that, you can then give the resulting pline arc thickness, mirror it and pedit join it into a circle.

The selected object rotates to match the angle of your reference object, as you see here. Then move the object to its proper location.

Which method do you use? Or do you have another method? Leave a comment!

Want more productivity tips like this? You can draw and edit faster and easier with this easy to follow top 25 productivity tips every AutoCAD user should know.

Create a circle with a width

There are various reasons that you might need to create a circular object with a specific width, such as matching cable widths, or showing cross sections. I’ve come up with 4 ways to go about this. The right one for you will depend on your needs.

Fit a polygon

An excellent method uses the POLYGON command and fits it using the PEDIT command:

Create a 4-sided polygon, using the POLYGON command. You can circumscribe or inscribe it. At the prompt for the radius, enter the radius of the circle that you want. I used a radius of 4. Of course, this creates a square.

Start the PEDIT command, select the polygon, and use the Fit option. Presto! You have a circle. Then use the Width option and specify the width that you want. (I used 0.25.) The result looks bigger, in this case, but still has the same radius of 4.

Use a donut

The DONUT command is very old, but can give you the result you want, especially if you know (or want to calculate) the inner and outer diameter. (Try typing doughnut on the command line. It works!)

Start the command, and specify the inner and outer diameters. Because I wanted the same result as for the previous method, I used 8 and 8.50. Then specify the center. Press Enter to end the command, because you’ll be prompted to place other donuts, and you don’t want too much sugar at once.

Use a lineweight

You can use the CIRCLE command and give it a lineweight. This method has a few problems:

  • The object only looks thick; if you change the circle’s properties, it no longer has that lineweight.
  • Lineweights are listed in millimeters by default. (This is because lineweights were originally designed for use with carousel pen plotters, and the width of plotter pens is generally measured in millimeters.) If you’re working in inches, this may make calculations difficult. However, you can change that default, using the LINEWEIGHT command. In the Lineweight Settings dialog box that opens, change the setting to inches.
  • If you turn off the display of lineweights (the LWT button on the status bar), you lose the thickness.
  • If you want all of your properties to be defined in your layers, you need to create a special layer for your circle.

On the other hand, this may be simple for you. Just draw a circle, select it, and enter the lineweight in the Properties palette (Ctrl+1).

## Dynamic block is another great productivity tip to master. Sign up below to get your Free tutorial on creating a complete dynamic block, including a drawing to practice on. You’ll make a movable chair, resizable desk, and more.

Trim the circle in half and use PEDIT

Jon e-mailed me with the following additional solution: If you use a circle and trim it in half, pedit that, you can then give the resulting pline arc thickness, mirror it and pedit join it into a circle.

I was also able to use the JOIN command to join the two circle halves.

Use the BOUNDARY command

Juan Cadavid wrote in another excellent way to create a circle with thickness, using the BOUNDARY command. Follow these steps:

  1. Draw a circle
  2. Type boundary on the command line
  3. In the Boundary Creation dialog box, check that the Object Type is set to Polyline.
  4. Click the Pick Points button and click inside the circle.
  5. Press Enter to create a circle polyline.
  6. Use the PEDIT command to change the width, as described previously.

Which method do you use? Or do you have another method? Leave a comment!

Want more productivity tips like this? You can draw and edit faster and easier with this easy to follow top 25 productivity tips every AutoCAD user should know.

Move objects between model and paper space

autocad-tips-chspace-1Let’s say that you add some text in your drawing, but then decide that the text should really be in a Notes box in your title block.

Or, you add some text in your title block and then think, “No, it should be part of the drawing.”

You can move objects from model space to paper space and vice versa, with the CHSPACE command. It’s quite simple:

  1. Click a layout. You need to be on a layout tab to use the command.
  2. Make sure that you’re in the space you need to be in to select the object you want to move.
  • If you want to move an object from paper space to model space, you need to be in paper space to select that object. If you aren’t in paper space, double-click outside the viewport to enter paper space.
  • If you want to move an object from model space to paper space, you need to be in model space to select that object. If you aren’t in model space, double-click inside the viewport to enter model space.
  1. Go to Home tab > Modify panel  (expanded)> Change Space to start the CHSPACE command.
  2. At the prompt, select one or more objects to move.
  3. Press Enter to end selection and the command. AutoCAD moves the selected objects to the other space.

Tip: You can select the objects before starting the  command. Then the command moves them without further input from you. It’s very quick.

## Dynamic block is another great productivity tip to master. Sign up below to get your Free tutorial on creating a complete dynamic block, including a drawing to practice on. You’ll make a movable chair, resizable desk, and more.

On the command line, you’ll see to messages like these:

1 object(s) changed from PAPER space to MODEL space.

Objects were scaled by a factor of 1.31642071267405 to maintain visual appearance.

The command scales your objects! According to the Help listing for CHSPACE, the command scales the objects “appropriately.”  I haven’t figured out exactly what this means and how the scale factor is calculated. If you know, please leave a comment!

Do you use this command? Why? I’m especially curious about why people might use it for objects other than text.

Want more productivity tips like this? You can draw and edit faster and easier with this easy to follow top 25 productivity tips every AutoCAD user should know.

3D Model in AutoCad – Simplify complex objects with compound volume

We often encounter objects and details that might be too complex to draw in 3D. From columns and balusters to spigots, escutcheons, machine parts etc.

But as like most things, complex objects also have humble beginnings.

AutoCad 3D model - hook

For this example, we can see that the object resembles a hook (see final image above), which we can segregate to several components, (A) spherical head, (B) cylindrical curved body, (C) threaded part, and (D) pointed end. From these parts, we can infer that it is composed of a half-sphere, a circle extruded in a direction, a spiraled rectangle, and a triangle.

3D Model Autocad
After identifying these basic geometries, we can now start creating the 3d model based on this perimeter/dimension:

3D AutoCad Model

1. Open a new drawing. Make sure you are working with GRIDMODE (F7) and ORTHOMODE (F8) on.
2. First, we identify major dimensions for the solid (midpoint and boundaries), set the center point to 0,0.
Switch to 3d Modelling Mode
3. Component A. From the center point, Use the command SPHERE, from the center point create a sphere. Enter the diameter or snap to reference lines. From the boundary lines, create a box. Extrude towards the apex of the sphere, snap. Type or click INTERSECT. You are now left with half of the sphere
4. Component B. From the base of the half-sphere, create a CIRCLE from the center point. Switch to side view and identify major dimensions in elevation (critical areas where parts of the solid merges, bends, or intersects). Using POLYLINE, draw the outline perpendicularly starting from the center. Using the SWEEP command, click the circle and follow the outline. Click or press ENTER.
5. Component C. To achieve the threaded part, we will circumscribe a CYLINDER (CYN) from the end part of Component B. Create a circle smaller than the previous component (Radius- Thread depth), use this as the diameter of your new cylinder, indicate the length then press Enter.
After making a cylinder, we create a winded thread around the smaller cylinder. Using the HELIX command, indicate the base and number of turns based on the segments of the thread (Length-Thread Distance). Stretch towards the length of the model. Press Enter.
6. Component D. To create the conical point switch to the UCS as before, then click or type CONE. Indicate the cone base and height as prompted. Press Enter.

Finally, to weld together all the parts of the model together, select UNION. Select the different parts and then Enter. You now have a completed AutoCad 3D model of a hook.

For more drawings that you can use to practice your skills, be sure to check out our previous AutoCad 3D modelling step by step tutorial to draw a 3D piston and this e-book with 101 CAD Exercises – Learn & Improve Your Skills.

Any questions about this tutorial? Do you have any tips to help make this tutorial easier? Did you find this tutorial helpful? Leave a comment! And please share the knowledge using the Share buttons below!

Tutorial: Automate tasks with a script file

A script is a macro, a list of commands that you can run all at once, and as many times as necessary, allowing you to automate tasks that would take a long time if you did them manually. Using Scripts in Autocad can be very powerful and you can run them on objects in one drawing, or on many drawings. AutoCad Script function have been around for many years and many people have a library of many scripts that they use.


See my tip, Record Actions with the Action Recorder, for a way to record your actions in AutoCAD 2009 and later.

Here are 3 important points that you need to know about script in AutoCad:

  1. Scripts are text-only (ASCII) files. You usually create them in Notepad.
  2. They have an SCR filename extension, so be sure to save them that way.
  3. Scripts use command-line syntax only. They can’t access dialog boxes, toolbar buttons, etc.

Scripts just execute commands. If you can’t do it by typing on the keyboard, you can’t do it in a script. The value of scripts is that you can use them over and over and they can do long lists of commands, even on many drawings.

If you require more automation beyond the functionality of Script in AutoCad , you may need AutoCad AutoLiSP function or other programming language. Check out our blog post comprehensive AutoLisp tutorial on How to create  a custom command for AutoCad using AutoLISP.

Follow these steps to create a script file:

  1. Set the FILEDIA system variable to 0, to stop dialog boxes that access files from opening.
  2. Run through the steps that you want to automate, using the command line only. Write down (or type in Notepad) the steps. You can copy your command line entry directly to Notepad. Press F2 to open the AutoCAD Text Window for that purpose.
  3. Press Enter at the end of each command or use a blank space, which is the equivalent of pressing Enter. The script reads every space, so you need to get it exactly right! The script is easier to read if you put each command on its own line.
  4. Enclose layer names or files names (and file paths) that contain spaces in quotation marks.
  5. Insert comments periodically for explanation. To insert a comment, precede the text with a semicolon.
  6. Save the file with an SCR filename extension, by typing .scr after the file name.
  7. Set FILEDIA back to 1.

To run and test the script file from within a drawing, use the SCRIPT command. A dialog box opens, where you can choose your script file. Click Open and the script runs.

Let’s say that you want to run a script file on more than one drawing. You can use the OPEN, CLOSE, and QSAVE commands to open drawings, run some commands, save the drawings, and then close them. You can still start the script from within the 1st drawing, but you can also start a script file as you open AutoCAD.

To do so, you change the expression that Windows uses to open AutoCAD. The best way to do this is to use the shortcut on your Desktop. Follow these steps:

    1. Right-click the shortcut and choose Properties.
    2. Click the Shortcut tab.
    3. At the end of the existing expression (which reads something like C:\Program Files\AutoCAD 2009\acad.exe) add a space and then the following: /b script_name
    4. Click OK.
    5. Double-click the shortcut to open AutoCAD and run the script.

Autodesk provides a free program for running Script files on multiple drawings, called ScriptPro. The file is called scriptpro.exe.

For those interested to explore Automation in AutoCad further, you will find more comprehensive AutoCad Lisp commands, AutoLISP tutorials & examples in my book, Top Customization Tips Every AutoCad Users Should Know.