Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Книги_AutoCad_2 / AutoCAD 2006 and AutoCAD LT 2006 Bible_2004г__.pdf
Скачиваний:
142
Добавлен:
09.04.2015
Размер:
17.83 Mб
Скачать

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.

Соседние файлы в папке Книги_AutoCad_2