- •Contents
- •Contents at a Glance
- •Acknowledgments
- •Preface
- •Is This Book for You?
- •How This Book Is Organized
- •How to Use This Book
- •Doing the Exercises
- •Conventions Used in This Book
- •What the Icons Mean
- •About the CD-ROM
- •Other Information
- •Contacting the Author
- •Foreword
- •Credits
- •About the Author
- •Summary
- •AutoCAD’s Advantages
- •Comparing AutoCAD and AutoCAD LT
- •Starting AutoCAD and AutoCAD LT
- •Creating a New Drawing
- •Using the AutoCAD and AutoCAD LT Interface
- •Creating a New Folder
- •Using the Interface
- •Saving a Drawing
- •Closing a Drawing and Exiting from AutoCAD and AutoCAD LT
- •Summary
- •Creating a New Drawing from a Template
- •Working with Templates
- •Opening a Drawing with Default Settings
- •Opening an Existing Drawing
- •Using an Existing Drawing as a Prototype
- •Saving a Drawing Under a New Name
- •Summary
- •The Command Line and Dynamic Input
- •Command Techniques
- •Of Mice and Pucks
- •Getting Help
- •Summary
- •Typing Coordinates
- •Displaying Coordinates
- •Picking Coordinates on the Screen
- •Overriding Coordinate Settings
- •Locating Points
- •Summary
- •Choosing Unit Types
- •Drawing Limits
- •Understanding Scales
- •Creating a Title Block
- •Specifying Common Setup Options
- •Customizing with the MVSETUP Command
- •Using the Setup Wizards
- •Summary
- •Using the LINE Command
- •Drawing Rectangles
- •Drawing Polygons
- •Creating Construction Lines
- •Creating Rays
- •Summary
- •Drawing Circles
- •Drawing Arcs
- •Creating Ellipses and Elliptical Arcs
- •Making Donuts
- •Placing Points
- •Summary
- •Panning
- •Using the ZOOM Command
- •Using Aerial View
- •Saving Named Views
- •Working with Tiled Viewports
- •Using Snap Rotation
- •Understanding User Coordinate Systems
- •Creating Isometric Drawings
- •Summary
- •Editing a Drawing
- •Selecting Objects
- •Summary
- •Copying and Moving Objects
- •Resizing Commands
- •Using Construction Commands
- •Creating a Revision Cloud
- •Hiding Objects with a Wipeout
- •Double-Clicking to Edit Objects
- •Grips
- •Editing with the Properties Palette
- •Selection Filters
- •Groups
- •Summary
- •Working with Layers
- •Changing Object Color, Linetype, and Lineweight
- •Working with Linetype Scales
- •Importing Layers and Linetypes from Other Drawings
- •Matching Properties
- •Summary
- •Drawing-Level Information
- •Object-Level Information
- •Measurement Commands
- •AutoCAD’s Calculator
- •Summary
- •Creating Single-Line Text
- •Understanding Text Styles
- •Creating Multiline Text
- •Creating Tables
- •Inserting Fields
- •Managing Text
- •Finding Text in Your Drawing
- •Checking Your Spelling
- •Customizing the spelling dictionary
- •Summary
- •Working with Dimensions
- •Drawing Linear Dimensions
- •Drawing Aligned Dimensions
- •Creating Baseline and Continued Dimensions
- •Dimensioning Arcs and Circles
- •Dimensioning Angles
- •Creating Ordinate Dimensions
- •Drawing Leaders
- •Using Quick Dimension
- •Editing Dimensions
- •Summary
- •Understanding Dimension Styles
- •Defining a New Dimension Style
- •Changing Dimension Styles
- •Creating Geometric Tolerances
- •Summary
- •Creating and Editing Polylines
- •Drawing and Editing Splines
- •Creating Regions
- •Creating Boundaries
- •Creating Hatches
- •Creating and Editing Multilines
- •Creating Dlines
- •Using the SKETCH Command
- •Digitizing Drawings with the TABLET Command
- •Summary
- •Preparing a Drawing for Plotting or Printing
- •Creating a Layout in Paper Space
- •Working with Plot Styles
- •Plotting a Drawing
- •Summary
- •Combining Objects into Blocks
- •Inserting Blocks and Files into Drawings
- •Managing Blocks
- •Creating and Using Dynamic Blocks
- •Using Windows Features
- •Working with Attributes
- •Summary
- •Understanding External References
- •Editing an Xref within Your Drawing
- •Controlling Xref Display
- •Managing Xrefs
- •Summary
- •Preparing for Database Connectivity
- •Connecting to Your Database
- •Linking Data to Drawing Objects
- •Creating Labels
- •Querying with the Query Editor
- •Working with Query Files
- •Summary
- •Working with 3D Coordinates
- •Using Elevation and Thickness
- •Working with the User Coordinate System
- •Summary
- •Working with the Standard Viewpoints
- •Using DDVPOINT
- •Working with the Tripod and Compass
- •Displaying a Quick Plan View
- •Shading Your Drawing
- •Using 3D Orbit
- •Using Tiled Viewports
- •Defining a Perspective View
- •Laying Out 3D Drawings
- •Summary
- •Drawing Surfaces with 3DFACE
- •Drawing Surfaces with PFACE
- •Creating Polygon Meshes with 3DMESH
- •Drawing Standard 3D Shapes
- •Drawing a Revolved Surface
- •Drawing an Extruded Surface
- •Drawing Ruled Surfaces
- •Drawing Edge Surfaces
- •Summary
- •Drawing Standard Shapes
- •Creating Extruded Solids
- •Drawing Revolved Solids
- •Creating Complex Solids
- •Sectioning and Slicing Solids
- •Using Editing Commands in 3D
- •Editing Solids
- •Listing Solid Properties
- •Summary
- •Understanding Rendering
- •Creating Lights
- •Creating Scenes
- •Working with Materials
- •Using Backgrounds
- •Doing the Final Render
- •Summary
- •Accessing Drawing Components with the DesignCenter
- •Accessing Drawing Content with Tool Palettes
- •Setting Standards for Drawings
- •Organizing Your Drawings
- •Working with Sheet Sets
- •Maintaining Security
- •Keeping Track of Referenced Files
- •Handling Errors and Crashes
- •Managing Drawings from Prior Releases
- •Summary
- •Importing and Exporting Other File Formats
- •Working with Raster Images
- •Pasting, Linking, and Embedding Objects
- •Summary
- •Sending Drawings
- •Opening Drawings from the Web
- •Creating Object Hyperlinks
- •Publishing Drawings
- •Summary
- •Working with Customizable Files
- •Creating Keyboard Shortcuts for Commands
- •Customizing Toolbars
- •Customizing Tool Palettes
- •Summary
- •Creating Macros with Script Files
- •Creating Slide Shows
- •Creating Slide Libraries
- •Summary
- •Creating Linetypes
- •Creating Hatch Patterns
- •Summary
- •Creating Shapes
- •Creating Fonts
- •Summary
- •Working with the Customization File
- •Customizing a Menu
- •Summary
- •Introducing Visual LISP
- •Getting Help in Visual LISP
- •Working with AutoLISP Expressions
- •Using AutoLISP on the Command Line
- •Creating AutoLISP Files
- •Summary
- •Creating Variables
- •Working with AutoCAD Commands
- •Working with Lists
- •Setting Conditions
- •Managing Drawing Objects
- •Getting Input from the User
- •Putting on the Finishing Touches
- •Summary
- •Understanding Local and Global Variables
- •Working with Visual LISP ActiveX Functions
- •Debugging Code
- •Summary
- •Starting to Work with VBA
- •Writing VBA Code
- •Getting User Input
- •Creating Dialog Boxes
- •Modifying Objects
- •Debugging and Trapping Errors
- •Moving to Advanced Programming
- •Summary
- •A Final Word
- •Installing AutoCAD and AutoCAD LT
- •Configuring and Using Workspaces
- •Configuring AutoCAD
- •Starting AutoCAD Your Way
- •Configuring a Plotter
- •Discovering AutoCAD and AutoCAD LT
- •Accessing Technical Support
- •Autodesk User Groups
- •Internet Resources
- •System Requirements
- •Using the CD-ROM with Microsoft Windows
- •What’s on the CD-ROM
- •Troubleshooting
- •Index
Customizing
Commands,
Toolbars,
and Tool Palettes
Customizing AutoCAD and AutoCAD LT can increase your efficiency and productivity. The time spent in preparation will
be paid back many times. Before you start customizing, you need to know some basics that apply to almost all customization. After you understand these basics, the process becomes much easier.
Overall, AutoCAD LT offers less customizability than AutoCAD; however, most of the features in this chapter apply to both AutoCAD and AutoCAD LT.
Working with Customizable Files
The capability to customize AutoCAD and AutoCAD LT is based on the fact that most of the support files are text files that you can edit yourself. The menu and tool palettes are in XML files that you customize using the new Customize User Interface dialog box and the Customize dialog box. Table 29-1 lists the most important files and their functions.
New |
The system of customizing most files has changed in AutoCAD 2006 |
Feature |
and AutoCAD LT 2006. The menus and toolbars are now contained |
|
|
|
in one XML file that you customize in the Customize User interface |
|
dialog box. |
Figure 29-1 shows a portion of one of these files, acad.pgp, which lists command shortcuts, or aliases. The equivalent file for AutoCAD LT is aclt.pgp.
29C H A P T E R
In This Chapter
Understanding the basics of customization
Creating keyboard shortcuts for commands
Customizing the toolbars
Customizing tool palettes
944 Part VI Customizing AutoCAD
Figure 29-1: You can edit the acad.pgp file to create keyboard shortcuts for AutoCAD commands.
Table 29-1: Customizable Files
AutoCAD File Name |
AutoCAD LT File Name |
Function |
|
|
|
sample.cus |
sample.cus |
Custom dictionary file. You can add words to the |
|
|
custom dictionary for use with the SPELL command. |
acad.pgp |
aclt.pgp |
Program parameters file. This file is generally used to |
|
|
create keyboard shortcuts (called aliases) for |
|
|
commands. |
acad.cui |
aclt.cui |
Customization file. You modify this file using the |
|
|
Customize User Interface dialog box. |
acad.mnl |
N/A |
AutoLISP routines used by AutoCAD’s main menu. If |
|
|
you create your own menus, you can have an MNL |
|
|
file with the same name as your menu for AutoLISP |
|
|
routines. AutoCAD only. |
acad2006.cfg |
aclt2006.cfg |
Configuration file for storing digitizer and other settings. |
|
|
Usually, you should use the Options dialog box to make |
|
|
these selections, instead of manually editing this file. |
|
|
See Appendix A for more information about this file. |
acad.dcl |
aclt.dcl |
Dialog Control Language (DCL) file. This file describes |
|
|
dialog boxes. You usually don’t edit this file, but you |
|
|
can write your own DCL files to create dialog boxes. |
Chapter 29 Customizing Commands, Toolbars, and Tool Palettes |
945 |
AutoCAD File Name |
AutoCAD LT File Name |
Function |
|
|
|
acad.lin and |
aclt.lin and |
Linetype definition file. You can also create your |
acadiso.lin |
acltiso.lin |
own linetype definition (LIN) files or add your own |
|
|
definitions to acad.lin. |
acad.lsp and |
N/A |
AutoCAD’s AutoLISP files. You create these files from |
acaddoc.lsp |
|
scratch. You can edit or add to these files to |
|
|
automatically load AutoLISP routines. Other |
|
|
customizable LSP files are discussed in Chapter 35. |
|
|
AutoCAD only. |
acad.mln |
N/A |
AutoCAD’s multiline library file. AutoCAD only. |
acad.pat and |
aclt.pat and |
AutoCAD’s hatch pattern file. You can also create your |
acadiso.pat |
acltiso.pat |
own. |
*.pc3 |
*.pc3 |
Plot configuration files. You can also create your own. |
|
|
A PC3 file contains all configuration settings for a |
|
|
plotter. This is not a text file; you customize it using a |
|
|
dialog box. For more information, see Chapter 17 and |
|
|
Appendix A. |
acad.fmp |
aclt.fmp |
Font mapping file. Use this file to specify substitute |
|
|
fonts, whether or not the original fonts are available |
|
|
on your system. |
acad.psf |
aclt.psf |
PostScript support file. It is used for the PSOUT and |
|
|
PSFILL commands. |
acad.slb |
aclt.slb |
Slide library file, used for hatch pattern examples in |
|
|
menus. You can use this file or create your own slide |
|
|
libraries. This is not a text file; see Chapter 30 for an |
|
|
explanation of how to create a slide library. |
*.scr |
*.scr |
A script file that you create and name. Script files are |
|
|
macros of commands and options that run |
|
|
automatically. |
*.shp |
*.shp |
A shape file that you create and name. Shape files |
|
|
usually hold fonts, but can hold other shapes as well. |
|
|
A shape file is then compiled into a file with an SHX |
|
|
extension for more efficient use. |
acad.rx |
N/A |
A list of ARX (an interface for programming AutoCAD) |
|
|
applications that load automatically. AutoCAD only. |
mtextmap.ini |
mtextmap.ini |
Font mapping for the appearance of text in the MTEXT |
|
|
editor. |
acad.unt |
aclt.unt |
A file that defines every conceivable type of unit. |
|
|
|
Editing customizable files
To customize AutoCAD or AutoCAD LT, you edit a text file, use the Customize User Interface dialog box, or use the Customize dialog box. To edit files in text-only (ASCII) format, you need a text editor, which is like a word processor but does not place any codes in the file. For most of the
946 Part VI Customizing AutoCAD
ASCII files, you can use Notepad, which comes with Windows. All major word processors let you save documents as text documents — just remember not to click that Save button until you’ve specified the right file format. Files that are not in ASCII format generally have an interface, such as a dialog box, in the program for editing them.
Backing up customizable files
Before editing any preexisting files, back them up. The new system of editing menus and toolbars in a dialog box helps to protect your system from errors that you might make when customizing, but if you want to undo all of your changes, you need a backup. You should back up in three stages:
Back up the original file as it came out of the box. Keep a disk with all of the customizable files that you might ever edit in their original form.
After you edit the file, back it up before each editing session. This way you always have your most recent version of the file. If you make a mistake, it’s easy to copy that file on top of the one with the mistake and put everything back to normal.
After you edit a file, back it up again so that you have it in case your hard drive crashes, or you need to reinstall AutoCAD or AutoCAD LT.
Note |
To find acad.cui or aclt.cui, choose Tools Options and click the Files tab. Open the |
|
Customization Files item, and then open the Main Customization File item. The location of |
|
this file is listed there. |
This means that you should have two disks, one with the original customizable files, and one with your most recent versions of them. At the very least, these disks should contain the following files:
acad.lin and acadiso.lin/aclt.lin and acltiso.lin
acad.lsp and acaddoc.lsp (AutoCAD only)
acad.mln (AutoCAD only)
acad.mnl (AutoCAD only)
acad.cui/aclt.cui
acad.pat and acadiso.pat/aclt.pat and acltiso.pat
acad.pgp/aclt.pgp
You may also want to back up templates that you’ve created.
Tip |
If you get into trouble, you can find an original copy of many of the customizable files at C:\ |
|
Program Files\AutoCAD 2006\UserDataCache\Support (if you used the default instal- |
|
lation location). |
|
You’ll use these disks not only when you make a mistake, but also whenever you need to rein- |
|
stall AutoCAD or AutoCAD LT, whether due to hard-disk failure, a virus on your system, the |
|
replacement of your old computer with a new one, or some other reason. Also, when you |
|
upgrade AutoCAD or AutoCAD LT to the next release, you can usually continue to work with |
|
your familiar, customized files. |
Chapter 29 Customizing Commands, Toolbars, and Tool Palettes |
947 |
Cross- |
In Appendix A, I mention the Migration dialog box that appears when you install or upgrade |
Reference |
AutoCAD or AutoCAD LT. This dialog box helps you to bring existing customizable files into |
|
|
|
your new installation of AutoCAD or AutoCAD LT. |
|
Using the command-line form of commands |
|
|
For many customization tasks, you need to work with commands. When you create a script |
|
|
file, which is a series of commands, or when you edit the menu file, you need to type out the |
|
|
commands that you want to execute. In these cases, the customizable files can only contain |
|
|
the command-line form of the commands. As a result, you need to learn a whole new way of |
|
|
working — the old-fashioned way, by typing commands on the command line. |
|
Tip |
If you’re not sure of the command name but you know the menu or toolbar item, execute |
|
|
the command on the menu or toolbar and then press Esc. You see the command name on the |
|
|
command line. |
|
|
A number of commands have a non-dialog-box version. Many commands can also be executed in |
|
|
their command-line version by placing a hyphen (-) before the command name. For some com- |
|
|
mands that have no command-line equivalent, you can use system variables to create the same |
|
|
effect. Table 29-2 lists command-line versions of commands that you can use for customization. |
|
|
|
|
|
|
Table 29-2: Command-Line Forms of Commands |
|
|
|
|
Command |
Command-Line Form |
|
|
|
|
ARCHIVE |
-ARCHIVE (AutoCAD only) |
|
ARRAY |
-ARRAY |
|
ATTDEF |
-ATTDEF |
|
ATTEDIT |
-ATTEDIT |
|
ATTEXT |
-ATTEXT |
|
BEDIT |
-BEDIT |
|
BHATCH |
-BHATCH |
|
BLOCK |
-BLOCK |
|
BOUNDARY |
-BOUNDARY |
|
COLOR |
-COLOR |
|
DDPTYPE |
PDMODE, PDSIZE |
|
DDVPOINT |
VPOINT |
|
DSETTINGS |
ORTHO, SNAP, GRID, ISOPLANE, AUTOSNAP, SNAPTYPE, DYNMODE, DYNPROMPT |
|
ETRANSMIT |
-ETRANSMIT |
|
EXPORT |
DXFOUT, STLOUT (AutoCAD only), BMPOUT, PSOUT, ACISOUT (AutoCAD only), |
|
|
3DSOUT (AutoCAD only), WMFOUT |
|
GROUP |
-GROUP |
Continued
948 Part VI Customizing AutoCAD
|
Table 29-2 (continued) |
|
|
Command |
Command-Line Form |
|
|
HATCHEDIT |
-HATCHEDIT |
HYPERLINK |
-HYPERLINK |
IMAGE |
-IMAGE |
INSERT |
-INSERT |
LAYER |
-LAYER |
LAYOUT |
-LAYOUT |
LINETYPE |
-LINETYPE |
MLEDIT |
-MLEDIT (AutoCAD Only) |
MTEXT |
-MTEXT |
OSNAP |
-OSNAP |
PAN |
-PAN |
PARTIALOAD |
-PARTIALOAD (AutoCAD only) |
PARTIALOPEN |
-PARTIALOPEN (AutoCAD only) |
PLOT |
-PLOT |
PLOTSTAMP |
-PLOTSTAMP |
PLOTSTYLE |
-PLOTSTYLE |
PROPERTIES |
CHANGE, CHPROP, -COLOR, -LAYER, -LINETYPE, -LTSCALE, CELTYPE, CELTSCALE, |
|
ELEV, THICKNESS |
PURGE |
-PURGE |
RENAME |
-RENAME |
STYLE |
-STYLE |
TABLE |
-TABLE |
TEXT |
-TEXT |
TOOLBAR |
-TOOLBAR |
UNITS |
-UNITS |
VBARUN |
-VBARUN (AutoCAD only) |
VIEW |
-VIEW |
WBLOCK |
-WBLOCK |
XBIND |
-XBIND |
XREF |
-XREF |
|
|
In addition, you can use the dimension variables to format dimensions in place of using the DIMSTYLE command, which opens the Dimension Style Manager dialog box. See the discussion of the -DIMSTYLE command in Chapter 15.
