HA2013_Chapter18

advertisement
Chapter 18: Customizing AutoCAD
After completing this Chapter, you will be able to do the following:
•
Workspaces
•
Ribbons, Tabs, and Panels
•
Quick Access toolbar
•
Toolbars
•
Menus
•
Shortcut menus
•
Keyboard shortcuts
•
Mouse buttons
•
Command Aliases
•
Creating custom hatch patterns, shapes, fonts, and hatch patterns
Customizing the User Interface
To customize workspaces, panels, tabs, toolbars, menus, shortcut
menus, keyboard shortcuts, or mouse buttons, right-click on any
toolbar and choose Customize from the shortcut menu. AutoCAD
displays the Customize User Interface (CUI) dialog box
Workspaces
Workspaces are user interface configurations that you create. For each
workspace, you can display toolbars, buttons, menus, and/or menu
items and dockable windows such as the Properties palette and the
Sheet Set Manager.
In the CUI dialog box, open the Workspaces node (double-click or
select the + in the square next to the Workspace node), and the named
workspaces are displayed in tree mode.
Select the AutoCAD Default workspace and its contents are displayed
in the Workspace Contents pane. Other panes displayed include the
Command List and Properties panes.
Ribbon Panels
Panels contain the buttons that, when chosen, invoke a command, mode, or
custom macro, or display a dialog box.
Customizing panels can make drawing tasks easier and more efficient.
Frequently used buttons can be consolidated on one panel and rarely used
buttons can be removed or hidden. You can also create custom panel, and
create or change the button image associated with a command.
Ribbon panels are organized by rows, sub-panels, and panel separators. A
ribbon can have one or more rows. A row, similar to a toolbar, determines
the order and position that commands and controls appear on the ribbon
panel.
Customize User Interface - Creating a new panel from the flyout menu
Ribbon Tabs
Ribbon tabs control the display and order of ribbon panels on the ribbon.
Ribbon tabs can be added to a workspace to control which ribbon tabs are
displayed on the ribbon.
Ribbon tabs do not contain any commands or controls like a ribbon panel
does; instead, they manage the display of ribbon panels on the ribbon.
Once a ribbon tab is created, references can be added to any of the ribbon
panels from the Ribbon Panels node. References to a ribbon panel can be
created by using copy and paste, or by dragging a ribbon panel from the
Ribbon Panels node onto the ribbon tab.
New ribbon tabs are added automatically to all workspaces, just like new
toolbars and menus are. Ribbon tab from a particular workspace can be
removed using the Workspace Contents pane.
Customize User Interface - Creating a new tab from the flyout menu
Quick Access Toolbar
The Quick Access Toolbar is located to the right of the menu browser
and provides direct access to a defined set of commands. It is always
located in the same place in the program, but different commands may
be displayed on it based on the current workspace.
Commands can be added, removed, and reposition. Several commands
can be added, and if there is no room available, commands roll into a
flyout button.
Customize User Interface – Available commands in the Quick Access
toolbar
Toolbars
Toolbars contain the buttons that, when chosen, invoke a command,
mode, or custom macro, or display a dialog box or flyout toolbar.
Customizing toolbars can make your drawing tasks easier and more
efficient. Frequently used buttons can be consolidated on one
toolbar and rarely used buttons can be removed or hidden. You can
also specify a text string to be displayed when the cursor is near a
button.
You can create custom toolbars and flyout toolbars, and create
or change the button image associated with a toolbar command.
Toolbar buttons that cause flyouts to be displayed have a black
triangle in the lower right corner. To create a flyout, you can start
from scratch or drag an existing toolbar onto another toolbar.
To create a new toolbar, select the Toolbar node or one of the
individual toolbars in the Customizations in All CUI Files pane of the
CUI dialog box.
When you choose an individual command that is added to the newly
created toolbar in the Customizations in All CUI Files pane, AutoCAD
displays under the Properties pane the lists of properties for the
selected command under the headings of General, Macro, Advanced,
and Images
Menus
Pull-down menus are displayed as a list under a menu bar. In the CUI
dialog box, the Menus node displays menus defined in all workspaces.
Pull-down menus should have one alias in the range of POP1 through
POP499. Menus with an alias of POP1 through POP16 are loaded by
default when a menu loads. All other menus must be added to a
workspace to be displayed.
To edit properties of an existing menu, select the menu name in the
Customizations in All CUI Files pane and AutoCAD lists the
corresponding properties for the selected menu under the headings of
General and Advanced. The General section displays the Name and
Description of the selected menu. The Advanced section
displays the Alias name and Element ID (read-only). Here you may
make changes to the properties of an existing menu.
To edit properties of an existing menu, select the menu name in the
Customizations in All CUI Files pane and AutoCAD lists the
corresponding properties for the selected menu under the headings of
General and Advanced. The General section displays the Name and
Description of the selected menu. The Advanced section
displays the Alias name and Element ID (read-only). Here you may
make changes to the properties of an existing menu.
Shortcut Menus
Shortcut menus are displayed at your cursor location when you rightclick. The shortcut menu and the options it provides depend on the
pointer location and whether an object is selected or a command is in
progress. Context-sensitive shortcut menus display options that are
relative to the current command or the selected object. Shortcut
menus are referenced by their aliases and are used in specific
situations.
To create a new shortcut, right-click shortcut menus in the
Customizations in All CUI Files pane and from the shortcut menu,
choose MENU from the NEW flyout menu. AutoCAD creates a new
menu (named ShortcutMenu1) and places it at the bottom
of the Shortcut Menu tree. Rename it with an appropriate name.
Select the new shortcut menu in the tree view, and update the
Properties pane
Keyboard Shortcuts
Keyboard shortcuts include shortcut keys and temporary override
keys. Keyboard shortcuts are used to assign commands to custom
keystroke combinations. You can assign shortcut keys (sometimes
called accelerator keys) to commands you use frequently,
and temporary override keys to execute a command or change a
setting when a key is pressed. Shortcut keys are keys or key
combinations that start commands.
You can create and edit keyboard shortcuts for a selected command
in the Properties pane. In the CUI dialog box, expand the Shortcut
Keys node in the Customizations in All CUI Files pane. Then drag
the command (to be invoked by the new shortcut combination of
strokes) from those listed on the Command List pane in the CUI
dialog box to the list of Shortcut Keys in the Customizations in All
CUI Files pane. In the Properties pane, the properties for the newly
created shortcut key are display which can be modified.
Mouse Buttons
Mouse buttons control the functions of a Windows system pointing
device. You can customize these functions in the Customize User
Interface dialog box.
For a pointing device with more than two buttons, you can change the
functions of the second and third button. The first button on any
pointing device cannot be changed in the Customize User Interface
dialog box. Different functions of the pointing device can be created
by using various combinations of SHIFT and CTRL keys with
clicking. The number of possible functions depends on the number of
assignable buttons. The combinations include click, SHIFT+click,
CTRL+click, and CTRL+SHIFT+click. The tablet buttons are
numbered sequentially.
The Legacy node of the Customizations in All CUI Files pane lets
you make changes in features that are considered obsolete or of
minimal usage in the latest version of AutoCAD. These include Tablet
Menus, Tablet Buttons, Screen Menus, and Image Tile Menus.
The Partial CUI Files node of the Customizations in All CUI Files
pane lets you load partial CUI files. Partial CUI files are loaded on top
of the main CUI file. They allow you to create and modify most
interface elements (such as toolbars, menus, and so on) in an external
CUI file without having to import the customizations to your main
CUI file.
Command Aliases
Command aliasing provides an alternate keystroke for invoking a
command.
An alias can only invoke a command, not the options associated with
the command.
Aliases are stored in the ACAD.PGP file.
The format to define an alias is as follows:
<Alias>,*<Full command name>
The abbreviation preceding the comma is the character or characters to
be entered at the “Command:” prompt. The asterisk (*) must precede
the command you wish to invoke.
Aliases cannot be used in scripts.
Customize Menus with Macros
Selecting an item from a menu or toolbar might execute a command,
an AutoLISP routine, or a macro, or cause another menu to be
displayed. If you perform an applicationspecific task on a regular basis that requires multiple steps to
accomplish this task, you can place this in a menu macro (in the
Macro text box in the Properties pane of the CUI dialog box) and have
AutoCAD complete all the required procedures in a single step while
pausing for input if necessary.
Menu macros are similar to script files (files ending with *.scr).
The following example macro will create a layer called “EL_OFFEQ”
(Electrical Office Equipment), assign the color “RED”, and make it
the current layer:
^C^C-LAYER;M;EL-OFFEQ;C;RED;;;
Following is a partial list of the codes you will encounter in menu
macros:
Customize Hatch Patterns
The default hatch patterns used by AutoCAD are stored in the
acad.pat file. You can add pattern definitions to this file or create your
own files. This can be done by using a text editor such as NOTEPAD.
The Boundary Hatch and Hatch Pattern Palette dialog boxes display
the names of all the hatch patterns defined in the acad.pat file. You
can add new hatch patterns to the dialog boxes by adding the hatch
definitions to the acad.pat file.
Each pattern definition has one header line giving the pattern
name/description and a separate specification line describing each
family of lines in the pattern.
The header line has the following format:
*pattern-name, [description]
The pattern name will be the name for which you will be prompted
when using the HATCH command. The description can be used to
explain the purpose of the hatch pattern. It is optional and it will not
be displayed while using the HATCH command. The leading asterisk
denotes the beginning of a hatch pattern.
The format for a line family is as follows:
angle, x-origin, y-origin, delta-x, delta-y, [dash-1, dash-2...]
The brackets “[]” denote optional segment/space specifications used
for non continuous-line families. In all definitions, the angle, origins,
and deltas are mandatory (even if their values are zero).
An example of continuous lines that are rotated at 30 degrees and
separated by 0.25 units is as follows:
*P30, 30 degree continuous
30, 0,0, 0,.25
Customize Shapes and Text fonts
AutoCAD allows to define shapes to use as drawing symbols and
text fonts. Shapes are objects that used like blocks.
The LOAD command loads the compiled shape file containing the
shape definition.
The SHAPE command is then used to insert shapes from the file into
the drawing.
Similar to Block insert, you can specify the scale and rotation to use
for each shape as you add it. AutoCAD SHP fonts are a special type
of shape file, and are defined in the same way as shape files.
Blocks are more versatile and easier to use and apply than shapes.
However, shapes are more efficient for AutoCAD to store and draw.
Descriptions of shapes are entered in a specially formatted text file
with a file extension of .shp. To create the file, use a text editor and
save in ASCII format, and then compile the ASCII file with
COMPILE command.
Compiling a shape definition file (SHP) generates a compiled shape
file (SHX).
The compiled file has the same name as the shape definition file but
with a file type of SHX. If the shape definition file defines a font,
you use the STYLE command to define a text style.
If the shape definition file defines shapes, you use the LOAD
command to load the shape file into the drawing. Then, you use the
SHAPE command to place the individual shapes in the drawing
(similar in to INSERT command).
The syntax of the shape description for each shape or character is
the same regardless of the final use (shape or font) for that shape
description. If a shape definition file is to be used as a font file, the
first entry in the file describes the font itself rather than a shape
within the file. If this initial entry describes a shape, the file is used
as a shape file.
Each shape description has a header line of the following form and
is followed by one or more lines containing specification bytes,
separated by commas and terminated by a 0.
*shapenumber,defbytes,shapename
specbyte1,specbyte2,specbyte3,...,0
Customize Linetypes
Linetype definitions are stored in files with an .LIN (default
acad.lin) extension. The definitions are in ASCII format and can be
edited, or you can add new ones of your own by using a text editor
in the non-document mode.
Simple linetypes consist of series of dashes, dots, and spaces.
Complex linetypes have repeating “out-of- line” objects, such as
text and shapes, along with the optional in-line dashes, dots, and
spaces. These are used in mapping/surveying drawings for such
things as topography lines, fences, utilities, and many other
descriptive lines. Instrumentation/control drawings also use many
lines with repeating shapes to indicate graphically the purpose of
each line.
Each linetype definition in a file comprises two lines. The first line
must begin with an asterisk, followed by the linetype name and an
optional description in the following format:
*ltname,description
The second line gives the alignment and description by using
proper codes and symbols, in the following format:
alignment,patdesc-1,patdesc-2,...
For example: linetype definition for two dashes and a dot, called
DDD, is as follows:
*DDD,___ ___ . ___ ___ . ___ ___ .
A,.75,-.5,.75,-.5,0,-.5
Download