Chapter 28. Customizing Toolbars, Menus, Linetypes, and Hatch Patterns

AutoCAD offers a high degree of flexibility and customization, enabling you to tailor the software's look and feel to your requirements. In this chapter, you'll see how to customize AutoCAD so that it integrates more smoothly into your workgroup and office environment.

The first part of the chapter shows how to adapt AutoCAD to fit your particular needs. You'll learn how to customize AutoCAD by modifying its menus, and you'll learn how to create custom macros for commands that your workgroup uses frequently.

You'll then look at some general issues that arise when you use AutoCAD in an office. In this discussion, you may find help with problems you've encountered when using AutoCAD in your particular work environment. I'll also discuss how to manage AutoCAD projects.

In this chapter you'll learn to do the following:

  • Use workspaces

  • Customize the user interface

  • Create macros in tools and menus

  • Edit keyboard shortcuts

  • Save, load, and unload your customizations

  • Understand the Diesel macro language

  • Create custom linetypes

  • Create hatch patterns

Using Workspaces

Once you're comfortable with AutoCAD, you may find that you like a certain arrangement of Ribbon panels, toolbars, and palettes or that you have several sets of panels and toolbars that you like to use depending on your type of work. You've already worked with the two workspaces AutoCAD offers out of the box: 2D Drafting & Annotation and 3D Modeling. You can also set up your own custom panel and toolbar arrangements and then save those arrangements for later retrieval using the Workspace feature. Let's take a closer look at how you can customize this feature.

The Workspace Switching tool and its menu are shown in Figure 28.1. In Chapter 1, you saw how you can use this tool to save your AutoCAD window layout. You can save multiple arrangements of panels, toolbars, and palettes and then recall them easily by selecting them from the Workspace Switching tool.

The Workspace Switching tool

Figure 28.1. The Workspace Switching tool

Click the Workspace Switching tool on the status bar and select Workspace Settings to open the Workspace Settings dialog box, shown in Figure 28.2. You can also type Wssettings

The Workspace Switching tool
The Workspace Settings dialog box

Figure 28.2. The Workspace Settings dialog box

Let's take a moment to look at this dialog box in detail. The Save Current As option in the Workspace Switching tool lets you save your current AutoCAD window arrangement.

With the Workspace Settings dialog box open, you can see the 2D Drafting & Annotation, 3D Modeling, and AutoCAD Classic options. If you've used the Initial Setup wizard to create an industry-specific workspace, you'll see the Initial Setup Workspace option here as well. From here, you can control the behavior of the settings.

The check box next to each setting lets you control whether the item appears in the Workspace Switching tool menu. For example, if you remove the checkmark from the AutoCAD Classic setting, you'll see only 2D Drafting & Annotation and 3D Modeling in the Workspace Switching tool menu.

The My Workspace = drop-down list lets you select which workspace setting is activated when you click the My Workspace tool on the Workspace Switching tool. You can use this option for your most frequently used workspace settings.

The options in the When Switching Workspaces group at the bottom of the Workspace Settings dialog box let you determine whether workspace changes are saved automatically. For example, if you select Automatically Save Workspace Changes, then the next time you switch to a different workspace setting, AutoCAD will save any changes you've made to the current workspace.

The Workspace Switching tool is the easiest customization feature you'll find in AutoCAD, and it can go a long way toward helping you stay organized. But workspaces are just the tip of the iceberg when it comes to customizing AutoCAD. In the next section, you'll delve into the Customize User Interface (CUI) feature to see how you can customize the AutoCAD menus, panels, and toolbars directly.

Customizing the User Interface

Out of the box, AutoCAD offers a generic arrangement of Ribbon panels, tools, and palettes that works fine for most applications. But the more you use AutoCAD, the more you may find that you tend to use tools that are scattered over several Ribbon panels. You'll probably feel that your work would go more easily if you could create a custom set of panels and menus to consolidate those tools. If you're to the point of creating custom macros, you may want a way to have easy access to them.

The Customize User Interface (CUI) is a one-stop location that gives you nearly total control over the menus, panels, and toolbars in AutoCAD. With the CUI feature, you can mold the AutoCAD interface to your liking. The main entry point to the CUI is the Customize User Interface dialog box.

The following section introduces you to the CUI by showing you how to add a tool to the Draw Ribbon panel. You'll also get a chance to see how to create an entirely new panel and custom tools.

Taking a Quick Customization Tour

The most direct way to adapt AutoCAD to your way of working is to customize the Ribbon. AutoCAD offers new users an easy route to customization through the Customize User Interface dialog box. With this dialog box, you can create new Ribbon panels and toolbars, customize tools, and even create new icons. You can also create keyboard shortcuts.

To get your feet wet, try adding a tool to the Draw panel:

  1. If it's still open, close the Workspace Settings dialog box.

  2. Click the User Interface tool in the Manage tab's Customization panel to open the Customize User Interface dialog box, shown in Figure 28.3. You can also type Cui

    Taking a Quick Customization Tour
  3. In the Customizations In All Files group, expand the Ribbon option, and then expand the Panels option that appears just below. Scroll down the list and expand the Home 2D – Draw option. You see a set of options labeled Row 1, Row 2, and so on.

  4. Click the Home 2D – Draw option. A view of the Draw Ribbon panel appears in the Panel Preview group (Figure 28.4).

  5. Expand the Row 4 item under the Home 2D – Draw option. You'll see the names of the three tools that appear at the very bottom of the Draw panel. These tools are 3D Polyline, Helix, and Donut.

  6. In the Command List group, select Dimension from the Filter Command List By Category drop-down list (Figure 28.5).

    The Customize User Interface dialog box

    Figure 28.3. The Customize User Interface dialog box

    The Draw Ribbon panel appears.

    Figure 28.4. The Draw Ribbon panel appears.

    Choose the Dimension command.

    Figure 28.5. Choose the Dimension command.

  7. In the bottom panel of the Command List group, scroll down the list and then locate and select Dimension, Linear. This is the Linear Dimension command. When you select Linear, the Properties group displays the properties of the Linear command. The Preview group changes to show the Button Image group, and you see the Linear Dimension icon, as shown in Figure 28.6.

    The Panel Preview groups change when you select an element from the Command List group or the Customizations In All Files group.

    Figure 28.6. The Panel Preview groups change when you select an element from the Command List group or the Customizations In All Files group.

  8. Carefully click and drag the Dimension, Linear item from the Command List group into the Customizations In All Files group, but don't release the mouse button yet. As you drag the item over the tool names in the Customizations In All Files group, a bar tells you where your dragged item will appear (see Figure 28.6). If you pause over an option, you'll see an arrowhead appear next to the option. The arrowhead also indicates where the dragged command will be placed. The list may automatically scroll up or down depending on where you place the bar. This is to allow you to place the bar in an area of the list that isn't currently displayed.

  9. Place the bar just above 3D Polyline, and release the mouse button. Dimension, Linear appears above 3D Polyline in the list (Figure 28.7), and you see its icon in the Panel Preview area.

    After positioning the Dimension icon

    Figure 28.7. After positioning the Dimension icon

  10. Click OK. The next time you check, you'll see the Dimension, Linear tool appear in the expanded Draw panel just to the left of the 3D Polyline tool (Figure 28.8).

    The tool is in place.

    Figure 28.8. The tool is in place.

You've just added a command to the Draw panel. You can follow the previous steps to add any command to any Ribbon panel, toolbar, or menu bar menu. Now, suppose you change your mind and you decide to remove Dimension, Linear from the Draw panel. Here's how it's done:

  1. Click User Interface in the Manage tab's Customization panel or type Cui

    The tool is in place.
  2. In the Customizations In All Files group of the Customize User Interface dialog box, expand the Ribbon option and Panels option and then continue to expand options as you did before to get to the Dimension, Linear command you added earlier.

  3. Click Dimension, Linear and then right-click and choose Remove from the shortcut menu. You'll see a warning message asking if you "really want to delete this element."

  4. Click Yes. The Dimension, Linear command is removed.

  5. Click OK to close the dialog box.

Dimension, Linear has been removed from the Draw panel. As you've just seen, adding tools to a panel is a matter of clicking and dragging the appropriate item from one list to another. To remove tools, right-click the tool and select Remove.

Before you go too much further, you may want to know a little more about the Customize User Interface dialog box and how it works. You saw briefly how each group displayed different elements of AutoCAD's interface, from a listing of panel tools to an individual tool's icon. Let's look at each group independently to see how it's organized.

Understanding the Customizations In All Files Panel

In the previous exercise, where you placed the Dimension, Linear command in the Draw panel, you saw an arrowhead appear when you hovered over an option. The arrowhead indicates the location where the command will be placed when you release the mouse button. If the arrowhead points to a command, the new command will be placed after the item indicated by the arrowhead. If the item is a folder icon, then the new command will be placed inside that folder.

You may see items called Sub-Panel options. These allow you to mix single tools and rows like the Line tool and the three rows you see to the right of the Line tool at the top of the Draw panel. Finally, the <SLIDEOUT> item you see in the list indicates the division between the main part of the panel and the expanded panel. Figure 28.9 shows how the list in the Customizations In All Files group relates to the Ribbon panel components.

The Customizations In All Files list compared to the Ribbon panel

Figure 28.9. The Customizations In All Files list compared to the Ribbon panel

Notice that the Line tool straddles the top three rows in the Draw panel. This is done by placing the Line command at the same level as the Sub-Panel option. The Sub-Panel option is further divided into rows. Figure 28.10 shows how the rows appear when they are expanded. Flyouts on the Ribbon panel appear as "Drop-Down" options in the Customizations In All Files group.

The Sub-Panel1 option contains the rows that in turn contain flyouts labeled as "Drop-Down" options.

Figure 28.10. The Sub-Panel1 option contains the rows that in turn contain flyouts labeled as "Drop-Down" options.

If you expand a "Drop-Down" option, you'll see the tools that appear in the flyouts of the tool in the panel (Figure 28.11).

The tools in the Customizations panel's "Drop-Down" list appear in the appropriate flyout.

Figure 28.11. The tools in the Customizations panel's "Drop-Down" list appear in the appropriate flyout.

You can add new panels, rows, sub-panels, and drop-downs (flyouts) by right-clicking an item in the list and selecting the appropriate option from the shortcut menu (Figure 28.12).

Create new containers via the shortcut menu.

Figure 28.12. Create new containers via the shortcut menu.

If you understand the structure of these lists, you'll find that it is quite easy to customize the Ribbon panels to your liking.

Getting the Overall View

When you first opened the Customize User Interface dialog box by right-clicking the Ribbon, you saw a listing of the AutoCAD interface elements in the Customizations In All Files group. Just as you saw with the Ribbon panels, each of the other interface elements in the list can be expanded to get to its individual commands. If you expand the Toolbar list, for example, all the AutoCAD toolbars are available. Expand a toolbar and the commands contained in the toolbar are displayed. As you saw earlier, you can expand the Ribbon Panels list to gain access to the Ribbon panels. Table 28.l lists all the interface elements in the Customizations In All Files group with a brief explanation of their contents.

Table 28.1. Main Headings in the Customizations In All Files Group

Item

What It Contains

Workspaces

Workspaces that are currently available

Quick Access Toolbars

Quick Access toolbar tools

Ribbon

The Ribbon tabs, panels and contectural tab states

Toolbars

Toolbars

Menus

Menu bar menus

Quick Properties

Options on the Quick Properties palette

Rollover Tooltips

Rollover tooltip settings

Shortcut Menus

Menus shown with right-clicks

Keyboard Shortcuts

Current keyboard shortcuts, such as Ctrl+C and Ctrl+V

Double-Click Actions

Object-dependent double-click actions

Mouse Buttons

Mouse button options, such as Shift+click and Ctrl+click

LISP Files

Any custom LISP files that are used with your CUI

Legacy

Any legacy custom items you use, such as table or screen menus

Partial Customization Files

Custom CUI files that have been included in the main CUI file

You can customize any of the interface elements. For example, if you want to create new keyboard shortcuts, you can expand the Keyboard Shortcuts listing and add new shortcuts or edit existing ones. Right-click any item to add or delete options. If you click an item, its properties appear in the Properties group, where you can modify the item's function. Just as you added the Dimension, Linear dimension command to the Draw panel, you can click and drag a command into one of the menus under the Menus listing to add a command there.

You also see some options in the Customizations In All Files title bar. These options give you control over what is displayed in this group. You can also load and save CUI files from here.

Main Headings in the Customizations In All Files Group

You'll learn more about these options later in this chapter.

Finding Commands in the Command List

You've already seen how the Command List group contains all the commands in AutoCAD. You also saw that you can click and drag these items into options in the Customizations In All Files group. This list also contains predefined macros, icons used for tools, and Control Elements (called combo boxes in the Ribbon panels), which are the drop-down lists you see in panels and toolbars. The Layer drop-down list in the Layers panel is an example of a Control Element. The drop-down lists in the Home tab's Properties panel are also examples of Control Elements. When you select an item in the Command List group, you see either its properties in the Properties group or its icon in the Button Image group or both. The exception to this is the Control Elements, which have no editable features.

Opening Preview, Button Image, and Shortcuts

You've already seen how you can get a preview of a Ribbon panel by selecting the panel from the Customizations In All Files group. If you click a Ribbon panel from the list, you'll see the Panel Preview group, which shows you how the selected panel will appear. Previews aren't editable and are there for your reference.

If you click a tool listing, or element as it's called in AutoCAD nomenclature, in the Customizations In All Files group, you see the Button Image group. You can open this group by clicking the double-arrow head to the right of the Button Image group title bar. This group lets you select an icon for that tool by clicking a list of icons (see Figure 28.13), or you can edit an existing icon or create an entirely new icon. You'll get a chance to see this firsthand later in this chapter.

The Button Image group

Figure 28.13. The Button Image group

The Keyboard Shortcuts area in the Customizations In All Files group shows the Shortcuts group, which lists the existing keyboard shortcuts.

Getting to the Core of Customization in the Properties Group

Finally, when you're ready to do some serious customizing, you'll work with the Properties group. You see the Properties group in the lower half of the right side of the Customize User Interface dialog box when you select a command from the left side of the dialog box.

The Properties group is set up just like the Properties palette, and it works the same way. On the left side, you see a listing of options, and to the right of each option is a description or a text input box where you can make changes (see Figure 28.14).

If you go to the Customizations In All Files group and select the Line tool under the Home 2D – Draw option that you worked on earlier (Ribbon

Getting to the Core of Customization in the Properties Group
The Properties group showing the properties for the Line tool

Figure 28.14. The Properties group showing the properties for the Line tool

In the Command category, you see the Line tool's name in the Command Name listing. You also see the description that is displayed in the tool tip for the Line tool. You can change this description here in the Properties group and the description will change in the status bar.

In the Macro listing, you see the command as it would be entered through the keyboard. The ^C^C that precedes the actual line command input is equivalent to pressing the Esc key twice. If you scroll down, you'll see the Advanced category which offers information regarding the ID of this particular tool. Finally, the Images category lists the name of the image files used for the Line tool icon. Two icons are listed: one for the large icon version and one for the small icon version of the tool.

You'll get a chance to work with the Properties group later in this chapter. Next, you'll try your hand at creating your own custom toolbar.

Creating Your Own Ribbon Panels and Menus

Earlier, I mentioned that you can collect your most frequently used tools into a custom Ribbon panel or toolbar. Now that you've had a chance to become familiar with the Customize User Interface dialog box, you can try the following exercise to create your own Ribbon panel:

  1. If the Customize User Interface dialog box isn't open, click User Interface from the Manage tab's Customization panel.

  2. In the Customizations In All Files group, expand the Ribbon option and then right-click Panels and choose New Panel. The list expands and you see a new panel called Panel1 at the bottom of the Panels list. The name "Panel1" is highlighted and ready to be edited.

  3. Replace Panel1 by typing My Panel to give your panel a distinct name (Figure 28.15). As you type, the name changes. If you decide to change a panel name later, right-click a panel listing and then choose Rename.

You now have a custom Ribbon panel. You'll want to start to populate your panel with some commands. You've already seen how this works, but for review, try adding a few commands:

  1. Select Draw from the Filter Command List By Category drop-down list.

  2. In the Command List group, locate the command you want to add. In this instance, locate the Line tool.

  3. Click and drag the Line command to your new panel so that you see an arrowhead pointing to the Row 1 option (Figure 28.16).

    The new Panel1 option changed to My Panel

    Figure 28.15. The new Panel1 option changed to My Panel

    Point to the Row 1 option and you'll see the arrowhead appear.

    Figure 28.16. Point to the Row 1 option and you'll see the arrowhead appear.

  4. Release the mouse button. The Line tool appears below Row 1.

  5. Repeat steps 2 and 4 to add more commands to your panel.

  6. To add another row, right-click on My Panel and select New Row. You can add more tools to your second row.

You can add several more rows to your panel, but after the first row, additional rows will be placed below the <SLIDEOUT>, thereby placed in the expanded portion of the panel.

Customizing Ribbon Panel Tools

Let's move on to more serious customization. Suppose you want to create an entirely new button with its own functions. For example, you might want to create a set of buttons that insert your favorite symbols. Or you might want to create a Ribbon panel containing a set of tools that open some of the other toolbars that are normally put away.

Creating a Custom Tool

Follow these steps to create a custom tool:

  1. Open the Customize User Interface dialog box, expand the Ribbon Panels list, and then expand the My Panel list.

  2. Creating a Custom Tool
    Click the Create A New Command tool and a new command appears in the list.

    Figure 28.17. Click the Create A New Command tool and a new command appears in the list.

  3. Right-click the Command1 item, select Rename from the shortcut menu, and change the name to Door.

  4. In the Properties group to the right, change Description to Insert a 36″ door.

  5. Change the Macro option to the following:

    ^C^Cinsert door;36;;
  6. Click and drag the Door element from the command list into your My Panel item in the Customizations In All Files group. If you look at the Panel Preview group, you see that the Door tool you just added appears as a blank tool. This happens when no icon has been assigned to the tool.

The series of keystrokes you entered for the macro in step 5 are the same as those you would use to insert the door, with the addition of a few special characters. The semicolons are equivalent to a

Click the Create A New Command tool and a new command appears in the list.
The Properties group for your new custom tool that inserts a door block

Figure 28.18. The Properties group for your new custom tool that inserts a door block

You've created your panel, but it will not appear anywhere in the AutoCAD interface until you add it to a Ribbon Tab group. Here's how this is done:

  1. Under your My Panel listing in the Customizations In All Files group, click the My Panel panel option you just created, and then right-click and select Copy.

  2. In the Customizations In All Files group, scroll up to top of the list and expand the Tabs option.

  3. Right-click Home – 2D just below Ribbon Tabs, and then select Paste from the shortcut menu. Your My Panel panel appears at the bottom of the Home – 2D list and you see it appear in the Home tab of the Ribbon.

  4. Click OK in the Customize User Interface dialog box to close it.

Next, try the custom tool to make sure it works:

  1. Point to the Door tool in your My Panel panel in the Home tab. You see the Door tool tip.

    The Properties group for your new custom tool that inserts a door block
  2. Click the Door tool. The door appears in the drawing area at the cursor. It may appear very small because initially, it's being inserted at its default size of 1 unit.

  3. Click a location to place the door, and then click a point to set the door rotation. The door appears in the drawing.

In this example, you created a custom tool that inserts the door block. Later in this chapter, you'll learn more about creating macros for menus and tools. Next, you'll learn how to add a custom icon to your custom tool.

Creating a Custom Icon

You have all the essential parts of the button defined. Now you just need to create a custom icon to go with your Door button:

  1. Open the Customize User Interface dialog box.

  2. Expand the Customization In All Files Ribbon list to your My Panel option (Ribbon

    Creating a Custom Icon
  1. Expand the Row1 list, and select Door.

  2. Open the Button Image group and click any icon image. The icon appears in the Panel Preview group, replacing the blank image for your Door tool.

  3. In the Button Image group, click the Edit button to open the Button Editor dialog box. The Button Editor is like a simple drawing program. Across the top are the tools to draw lines, circles, and points as well as an eraser. Along the right side is a color toolbar from which you can choose colors for your icon. At upper left, you see a preview of your button.

  1. Before you do anything else, click the Clear button. This clears the current image.

  2. Draw the door icon shown in Figure 28.19. Don't worry if it's not perfect; you can always go back and fix it.

    Draw this door icon.

    Figure 28.19. Draw this door icon.

  3. Click Save, and then at the Save Image dialog box, enter Door36 for the name. The door icon is saved in the AutoCAD CUI file that stores all of the interface data.

  4. Click OK, and then click Close at the Button Editor dialog box.

  5. Click OK to close the Customize User Interface dialog box. You see your custom icon for the Door tool.

The Button Editor behaves like a simplified image editing tool and is fairly straightforward to use. The only part that may be confusing is that you have to clear the image and save any new image under a new name.

You can continue to add more buttons to build a panel of symbols. Of course, you're not limited to a symbols library. You can also incorporate your favorite macros or even AutoLISP routines that you accumulate as you work with AutoCAD. The possibilities are endless.

Creating Macros in Tools and Menus

Combining existing commands into new panels or toolbars can be useful, but you'll get even more benefit from the CUI by creating your own macros. Macros are predefined sets of responses to commands that can help automate your most frequently used processes.

Early on, you saw how a macro was included in a tool to insert a door. You added a special set of instructions in the Macro option of the Properties group to perform the door insertion and scale. You also saw how the Line command was formatted as part of a tool.

Creating Macros in Tools and Menus

Let's take a closer look at how macros are built. Start by looking at the existing Line tool and how it's formatted.

The Macro option for the Line tool starts with two ^C elements, which are equivalent to pressing the Esc key twice. This cancels any command that is currently operative. The Line command follows, written just as it would be entered through the keyboard. Two Cancels are issued in case you're in a command that has two levels, such as the Edit Vertex option of the Pedit command.

The underscore character (_) that precedes the Line command tells AutoCAD that you're using the English-language version of this command. This feature lets you program non-English versions of AutoCAD by using the English-language command names.

You may also notice that there is no space between the second ^C and the Line command. A space in the line would be the same as

Creating Macros in Tools and Menus
^C^C_LINE;;

In this sample menu option, the Line command is issued, and then an additional

Help Make Your Macro Readable

Pausing for User Input

Another symbol used in the macro option is the backslash (); it's used when a pause is required for user input. For example, the following sample macro starts the Arc command and then pauses for your input:

^C^C_arc \_e \_d

The space between ^c^c_arc and the backslash () represents pressing the spacebar. The backslash indicates a pause to enable you to select the starting endpoint for the arc. The _e represents the selection of the Endpoint option under the Arc command after you've picked a point. A second backslash allows another point selection. Finally, the _d represents the selection of the Direction option. Figure 28.20 illustrates this. If you want the last character in a menu item to be a backslash, you must follow the backslash with a semicolon.

The execution of the Arc menu item

Figure 28.20. The execution of the Arc menu item

Opening an Expanded Text Box for the Macro Option

As you become more expert at creating macros, you may find the line provided in the Macro option too small for your needs. Fortunately, you can open an expanded text box in which to write longer macros. For example, suppose you want to include the following macro in a tool:

(defun c:breakat ()
(command "break" pause "f" pause "@")
)
breakat

This example shows the Breakat AutoLISP macro. Everything in this segment is entered just as it would be from the keyboard at the Command prompt. You may find it a bit cumbersome to try to enter this macro in the text box provided by the Macro option in the Properties group of the Customize User Interface dialog box, but if you click the Macro text box, a Browse button appears to the right (Figure 28.21).

The Browse button in the Macro option

Figure 28.21. The Browse button in the Macro option

Click the Browse button to open the Long String Editor.

You can then enter the macro and see it clearly. The following shows how it would be entered:

^c^c(defun c:breakat ()+
(command "break" pause "f" pause "@")+
);breakat

It starts with the usual ^c^c to clear any current commands. The plus sign at the end of lines 1 and 2 tells AutoCAD that the macro continues in the next line without actually breaking it. The break is there to help make the macro easier to read as you enter it. It's okay to break an AutoLISP program into smaller lines. Doing so can help you read and understand the program more easily.

Editing Keyboard Shortcuts

Another area of customization that can be useful is the keyboard shortcut. You probably already know about the standard Ctrl+C and Ctrl+V, which are shortcuts to the Windows Copy and Paste functions. In AutoCAD, Shift+Ctrl+A toggles groups on and off, and Ctrl+1 opens the Properties palette.

You can edit existing keyboard shortcuts or create new ones by opening the Keyboard Shortcuts list in the Customizations In All Files group of the Customize User Interface dialog box. If you expand this list, you see Shortcut Keys and Temporary Override Keys. These can be expanded to reveal their elements. Select an element to display its properties in the Properties group.

You can click and drag a command from the Command List group into the Shortcut Keys group and then edit its properties to set the shortcut keys you want to use for the command. For example, if you click and drag the 3D Free Orbit command from the Command List group into the Shortcut Keys list and then select it from that list, you see its properties in the Properties group (Figure 28.22).

The Properties group

Figure 28.22. The Properties group

Click the Key(s) option in the Properties group and then click the Browse button that appears to the far right of the Keys option to open the Shortcut Keys dialog box.

Click in the Press New Shortcut Key input box, and then press the shortcut key you want to use for this command. For example, if you press Shift+Ctrl+Z, that sequence appears in the input box. If the shortcut you selected is already assigned to another command, you see a message that says so just below the input box. Click OK when you're done.

Saving, Loading, and Unloading Your Customizations

You may want to save the custom menus, panels, and toolbars you create with the Customize User Interface dialog box so that you can carry them with you to other computers and load them for ready access. To save your customization work, you need to use the Transfer tab of the Customize User Interface dialog box. Here's how it works:

  1. Open the Customize User Interface dialog box.

  2. Click the Transfer tab. This tab contains two panels: the left panel shows the Customizations In Main CUI group, and the right panel shows a similar group called Customizations In New CUI File.

  3. In the left panel, locate your custom component, such as a menu, a Ribbon panel, or a toolbar.

  4. Click and drag it to the appropriate item in the right panel. For example, click and drag a custom panel from the Ribbon panel list of the left group to the Ribbon panel section in the right group.

  5. Repeat step 4 for each custom component you've created.

  6. When you've copied everything from the left group to the right, click the drop-down list in the Customizations In New File title bar, and select Save As.

  7. In the Save As dialog box, enter a name for your customization file, and select a location.

  8. Click Save to complete the process.

Your customization is saved with the .cuix filename extension. Once it's saved as a file, you can load it into another copy of AutoCAD by doing the following:

  1. Open the Customize User Interface dialog box.

  2. Click the Load Partial Customization File tool in the Customizations In All Files group title bar.

    Saving, Loading, and Unloading Your Customizations
  3. In the Open dialog box, locate and select your CUI file, and then click Open.

  4. Back in the Customize User Interface dialog box, click OK.

  5. If your CUI file contains menus, enter Workspace

    Saving, Loading, and Unloading Your Customizations

As an alternative to using the Customize User Interface dialog box, you can use the CUIload command. Enter Cuiload

Saving, Loading, and Unloading Your Customizations

Click the Browse button to locate and select your CUI file. Once you've done this, the name of your file appears in the File Name input box. You can then click the Load button to import it into your AutoCAD session.

Finally, if you want to unload a CUI file, do the following:

  1. Open the Customize User Interface dialog box.

  2. Scroll down to the bottom of the list in the Customizations In All Files group, and expand the Partial CUI Files item.

  3. Right-click the partial CUI file you want to unload, and select Unload CUI File.

  4. Close the dialog box by clicking OK.

Understanding the Diesel Macro Language

Diesel is one of many macro languages AutoCAD supports, and you can use it to perform simple operations and add some automation to menus. As with AutoLISP, parentheses are used to enclose program code.

In the following sections, you'll look at the different ways to use the Diesel macro language. You'll start by using Diesel directly from the command line. This will show you how a Diesel macro is formatted and will give you a chance to see Diesel in action. Then you'll go on to see how Diesel can be used as part of a menu option to test AutoCAD's current state. In the third section, you'll see how Diesel can be used as part of the menu label to control what is shown in the menu. Finally, you'll learn how to use Diesel with field objects to control text in your drawing.

Using Diesel at the Command Line

You can use Diesel at the AutoCAD command line by using a command called Modemacro. The Modemacro command sends information to the status bar. Diesel can be used with Modemacro to perform simple tasks.

Try the following exercise to experiment with Diesel:

  1. At the Command prompt, type Modemacro

    Using Diesel at the Command Line
  2. At the Enter new value for MODEMACRO, or. for none <" ">: prompt, enter $(/,25,2)

    Using Diesel at the Command Line
    Using Diesel at the Command Line
  3. To clear the status bar, enter Modemacro

    Using Diesel at the Command Line

The equation you entered in step 2 is referred to as an expression. The structure of Diesel expressions is similar to that of AutoLISP expressions. The dollar sign tells AutoCAD that the information that follows is a Diesel expression.

A Diesel expression must include an operator of some sort, followed by the items to be operated on. An operator is an instruction to take a specific action, such as adding two numbers or dividing one number by another. Examples of mathematical operators include the plus sign (+) for addition and the forward slash (/) for division.

The operator is often referred to as a function and the items to be operated on as the arguments to the function, or simply the arguments. In the expression (/,25,2), the / is the function and 25 and 2 are the arguments. All Diesel expressions, no matter what size, follow this structure and are enclosed by parentheses.

Parentheses are important elements of an expression. All parentheses must be balanced; for each left parenthesis, there must be a right parenthesis.

You can do other things with Diesel besides performing calculations. The Getvar function is an AutoLISP function that you can use to obtain the drawing prefix and name. Try the following to see how Diesel uses Getvar:

  1. Type Modemacro

    Using Diesel at the Command Line
  2. Type $(getvar,dwgprefix)

    Using Diesel at the Command Line
  3. Press

    Using Diesel at the Command Line

In this example, the Getvar function extracts the drawing prefix and name and displays it in the status bar. You can use Getvar to extract any system variable you want. If you've been working through the tutorials in this book, you've seen that virtually all AutoCAD settings are also controlled through system variables. (The AutoCAD Help window contains a list of all the system variables.) This can be a great tool when you're creating custom menus because with Getvar, you can poll AutoCAD to determine its state. For example, you can find out what command is currently being used. Try the following exercise to see how this works:

  1. Click the Line tool on the Draw panel.

  2. Type ′Modemacro

    Using Diesel at the Command Line
  3. Type $(getvar,cmdnames)

    Using Diesel at the Command Line

Diesel can be useful in a menu when you want an option to perform a specific task depending on which command is currently active.

Using Diesel in a Custom Menu Macro

So far, you've been experimenting with Diesel through the Modemacro command. Using Diesel in a menu macro requires a slightly different format. You still use the same Diesel format of a dollar sign followed by the expression, but you don't use the Modemacro command to access Diesel. Instead, you use $M=. You can think of $M= as an abbreviation for Modemacro.

Here's a Diesel expression that you can use in a menu macro:

^C^C_Blipmode;$M=$(-,1,$(getvar,Blipmode))

This menu option turns Blipmode on or off depending on Blipmode's current state. As you may recall, Blipmode is a feature that displays point selections in the drawing area as tiny crosses. These tiny crosses, or blips, don't print and can be cleared from the screen with a redraw. They can be helpful when you need to track your point selections.

In this example, the Blipmode command is invoked, and then the $M= tells AutoCAD that a Diesel expression follows. The expression

$(-,1,$(getvar,Blipmode))

returns either 1 or a 0, which is applied to the Blipmode command to turn it either on or off. This expression shows that you can nest expressions. The most deeply nested expression is evaluated first, so AutoCAD begins by evaluating

$(getvar,Blipmode)

This returns either 1 or a 0, depending on whether Blipmode is on or off. Next, AutoCAD evaluates the next level in the expression

$(-,1,getvar_result)

in which getvar_result is either 1 or a 0. If getvar_result is 1, the expression looks like

$(-,1,1)

which returns 0. If getvar_result is 0, the expression looks like

$(-,1,0)

which returns 1. In either case, the end result is that the Blipmode command is assigned a value that is opposite of the current Blipmode setting.

Using Diesel as a Menu Bar Option Label

In the previous example, you saw how to use Diesel in a menu macro to read the status of a command and then return a numeric value to alter that status. You can also use Diesel as part of the menu bar option name so the text it displays depends on certain conditions. The following expression shows how to write a menu option name to display the current setting for Blipmode. It includes Diesel code as the menu option label:

$(eval,Blipmode = $(getvar,blipmode))

Normally, you would just have a menu name, but here you see some Diesel instructions. These instructions tell AutoCAD to display the message Blipmode = 1 or Blipmode = 0 in the menu, depending on the current Blipmode setting. You would place this code in the Properties group for the Blipmode custom command in the Customize User Interface dialog box. It goes in the Display/Name input box.

Using Diesel as a Menu Bar Option Label

Here's how it works. You see the familiar $(getvar,blipmode) expression, this time embedded in a different expression. You know that $(getvar,blipmode) returns either 1 or a 0, depending on whether Blipmode is on or off. The outer expression

$(eval,Blipmode = getvar_result)

displays Blipmode = and then combines this with getvar_result, which, as you've learned, will be either 1 or 0. The eval function evaluates any text that follows it and returns its contents. The end result is the appearance of Blipmode = 1 or Blipmode = 0 in the menu, depending on the status of Blipmode. Here's how the properties looks as a menu bar option under the Tools list of the Menus option in the Customizations in All Files panel.

Using Diesel as a Menu Bar Option Label

You can get even fancier and set up the menu option label to read Blipmode On or Blipmode Off by using the if Diesel function. Here's that same menu listing with additional Diesel code to accomplish this:

$(eval,Blipmode = $(if,$(getvar,blipmode),Off,On))

In this example, the simple $(getvar,blipmode) expression is expanded to include the if function. The if function reads the result of $(getvar,blipmode) and then returns the Off or On value depending on whether $(getvar,blipmode) returns 0 or a 1. Here's a simpler look at the expression:

$(if, getvar_result, Off, On)

If getvar_result returns 1, the if function returns the first of the two options listed after getvar_result, which is Off. If getvar_result returns 0, the if function returns On. The second of the two options is optional. Here's how the fancier Blipmode option appears in a menu.

Using Diesel as a Menu Bar Option Label

You've just skimmed the surface of what Diesel can do. To get a more detailed description of how Diesel works, press the F1 function key to open the AutoCAD 2010 Help dialog box. Click the Contents tab, expand the Customization Guide listing, and click the DIESEL listing that appears.

Table 28.2 shows some of the commonly used Diesel functions. Check the AutoCAD Help dialog box for a more detailed list.

Table 28.2. Sample of Diesel Functions

Code

Function

Example

result

Comments

+

Add

$(+,202,144)

346

 

Subtract

$(-,202,144)

58

 

*

Multiply

$(*,202,144)

29,088

 

/

Divide

$(/,202,144)

1.4028

 

=

Equal to

$(=,202,144)

0

If numbers are equal, 1 is returned.

<

Less than

$(<,202,144)

0

If the first number is less than the second, 1 is returned.

>

Greater than

$(>,202,144)

1

If the first number is greater than the second, 1 is returned, otherwise 0 is returned.

!

Not equal to

$(!,202,144)

1

If the numbers are equal, 0 is returned.

<=

Less than or equal to

$(+,202,144)

0

If the first number is less than or equal to the second, 1 is returned.

>=

Greater than or equal to

$(+,202,144)

1

If the first number is greater than or equal to the second, 1 is returned otherwise 0 is returned.

eq

Equal string

$(eq,Yes, No)

0

If both text strings are the same, 1 is returned.

eval

Evaluate text

$(eval,Here I Am)

Here I Am

Returns the text that follows.

getvar

Get system variable value

 

Current linetype scale

 

if

If/Then

$(if,1,Yes,No)

Yes

The second argument is returned if the first argument evaluates to 1. Otherwise, the third argument is returned. The third argument is optional.

Note

Note: To Indicate True or False, Diesel Uses 1 or 0.

Using Diesel and Fields to Generate Text

Using Diesel expressions in the status bar or in a menu can be helpful to gather information or to create a more interactive interface, but what if you want the results of a Diesel expression to become part of the drawing? You can employ field objects to do just that.

For example, suppose you want to create a note that shows the scale of a drawing based on the dimension scale. Further, you want the scale in the note to be updated automatically whenever the dimension scale changes. You can add a field object and associate it with a Diesel expression that displays the dimension scale as it relates to the drawing scale. Try the following steps to see how it's done:

  1. Using Diesel and Fields to Generate Text
  2. Right-click in the Text Editor, and select Insert Field to open the Field dialog box.

  3. In the Field Category drop-down list, select Other; then, in the Field Names list box, select DieselExpression.

  4. Add the following text in the Diesel Expression box to the right. If you need to expand the width of the dialog box, click and drag the right edge of the dialog box:

    $(eval,Dimension Scale: 1/)$(/,$(getvar, dimscale),12)$(eval, inch = 1 foot)
  5. Click OK in the Field dialog box, and then click Close Text Editor in the Multiline Text Ribbon tab. The following text is displayed in the drawing:

    Dimension Scale: 1/0.08333333 inch = 1 foot

The resulting text may not make sense until you change the dimension scale to a value that represents a scale other than 1-to-1. Here's how to do that:

  1. Enter Dimscale

    Using Diesel and Fields to Generate Text
  2. At the Enter new value for DIMSCALE <1.0000>: prompt, enter 96. This is the value for a ⅛″ scale drawing.

  3. Type Re

    Using Diesel and Fields to Generate Text
    Dimension Scale: ⅛ inch = 1 foot

In this example, several Diesel operations were used. The beginning of the expression uses the eval operation to tell AutoCAD to display a string of text:

$(eval Dimension Scale: 1/)

The next part tells AutoCAD to get the current value of the Dimscale system variable and divide it by 12:

$(/,$(getvar, dimscale),12)

Notice that this is a nested expression: $(getvar,dimscale) obtains the value of the Dimscale system variable, which is then divided by 12. The end of the expression adds the final part to the text:

$(eval, inch = 1 foot)

When it's all put together, you get the text that shows the dimension scale as an architectural scale. Because it's an AutoCAD text object, this text is part of the drawing.

Creating Custom Linetypes

As your drawing needs expand, the standard linetypes may not be adequate for your application. Fortunately, you can create your own. The following sections explain how to do so.

You'll get an in-depth view of the process of creating linetypes. You'll also learn how to create complex linetypes that can't be created by using the Express Make Linetype tool.

Viewing Available Linetypes

Although AutoCAD provides the linetypes most commonly used in drafting (see Figure 28.23), the dashes and dots may not be spaced the way you would like, or you may want an entirely new linetype.

The lines in this list of standard linetypes were generated with the underscore key (_) and the period (.) and are only rough representations of the actual lines.

Figure 28.23. The lines in this list of standard linetypes were generated with the underscore key (_) and the period (.) and are only rough representations of the actual lines.

To create a custom linetype, use the Linetype command. Let's see how this handy command works by first listing the available linetypes:

  1. Open a new AutoCAD file.

  2. At the Command prompt, enter -Linetype

    Where are the Linetypes Stored?
  3. At the Enter an option [?/Create/Load/Set]: prompt, enter ?

    Where are the Linetypes Stored?
  4. In the dialog box, locate and double-click Acad.lin in the listing of available linetype files. You get a list that shows the linetypes available in the Acad.lin file along with a simple description of each line.

  5. A message at the bottom says Press ENTER to continue:. Do so until you see the Command prompt.

Creating a New Linetype

Next, let's try creating a new linetype:

  1. At the ?/Create/Load/Set: prompt, enter C

    Creating a New Linetype
  2. At the Enter name of linetype to create: prompt, enter Custom

    Creating a New Linetype
  3. The dialog box you see next is named Create Or Append Linetype File. You need to enter the name of the linetype file you want to create or add to. If you select the default linetype file, Acad, your new linetype is added to the Acad.lin file. If you choose to create a new linetype file, AutoCAD opens a file containing the linetype you create and adds .lin to the filename you supply.

  4. Let's assume you want to start a new linetype file. Enter Newline

    Creating a New Linetype
  1. At the Descriptive text: prompt, enter a text description of your linetype. You can use any keyboard character as part of your description, but the actual linetype can be composed of only a series of lines, points, and blank spaces. For this exercise, enter the following, using the underscore key (_) to simulate the appearance of your line:

    Custom - My own center line __________ _ ____________ 
    New or Existing Linetype File
  2. At the Enter linetype pattern (on next line): prompt, enter the following numbers, known as the linetype code (after the A that appears automatically):

    1.0,-.125,.25,-.125
    New or Existing Linetype File
  3. At the New linetype definition saved to file. Enter an option [?/Create/Load/Set]: prompt, press

    You Can Set The Default Linetype

Remember, after you've created a linetype, you must load it in order to use it, as discussed in Chapter 5.

Understanding the Linetype Code

In step 6 of the previous exercise, you entered a series of numbers separated by commas. This is the linetype code, representing the lengths of the components that make up the linetype. The separate elements of the linetype code are as follows:

  • The 1.0 following the A is the length of the first part of the line. (The A that begins the linetype definition is a code that is applied to all linetypes.)

  • The first -.125 is the blank or broken part of the line. The minus sign tells AutoCAD that the line is not to be drawn for the specified length, which is 0.125 units in this example.

  • Next comes the positive value 0.25. This tells AutoCAD to draw a line segment 0.25 units long after the blank part of the line.

  • The last negative value, -.125, again tells AutoCAD to skip drawing the line for the distance of 0.125 units.

This series of numbers represents the one segment that is repeated to form the line (see Figure 28.24). You can also create a complex linetype that looks like a random broken line, as in Figure 28.25.

Linetype description with plotted line

Figure 28.24. Linetype description with plotted line

Random broken line

Figure 28.25. Random broken line

You may be wondering what purpose the A serves at the beginning of the linetype code. A linetype is composed of a series of line segments and points. The A, which is supplied by AutoCAD automatically, is a code that forces the linetype to start and end on a line segment rather than on a blank space in the series of lines. At times, AutoCAD stretches the last line segment to force this condition, as shown in Figure 28.26.

AutoCAD stretches the beginning and the end of the line as necessary.

Figure 28.26. AutoCAD stretches the beginning and the end of the line as necessary.

As mentioned earlier, you can also create linetypes outside AutoCAD by using a word processor or text editor such as Windows Notepad. The standard Acad.lin file looks like Figure 28.23 with the addition of the code used by AutoCAD to determine the line-segment lengths.

Normally, to use a linetype you've created, you have to load it through either the Layer or the Linetype dialog box (choose Other from the Linetype drop-down list in the Home tab's Properties panel). If you use one of your own linetypes frequently, you may want to create a button macro so it will be available as an option on a menu.

Creating Complex Linetypes

A complex linetype is one that incorporates text or special graphics. For example, if you want to show an underground gas line in a site plan, you normally show a line with the intermittent word GAS, as in Figure 28.27. Fences are often shown with an intermittent circle, square, or X.

For the graphics needed to compose complex linetypes, use any of the symbols in the AutoCAD font files discussed in Chapter 10. Create a text style by using these symbol fonts, and then specify the appropriate symbol by using its corresponding letter in the linetype description.

Samples of complex linetypes

Figure 28.27. Samples of complex linetypes

To create a linetype that includes text, use the same linetype code described earlier, with the addition of the necessary font file information in brackets. For example, say you want to create the linetype for the underground gas line mentioned previously by using just the letter G. You add the following to your Acad.lin file:

*Gas_line, -G-G-G-
A,1.0,-0.25,["G",STANDARD,S=.2,R=0,X=-.1,Y=-.1],-0.25

The first line serves as a description for anyone looking at this linetype code. The next line is the code itself. Note that the code should not contain spaces—spaces are used here for clarity.

The information in the square brackets describes the characteristics of the text. The actual text that you want to appear in the line is surrounded by quotation marks. Next are the text style, scale, rotation angle, X displacement, and Y displacement.

You can substitute A for the rotation angle (the R value), as in the following example:

A,1.0,-0.25,["G",standard,S=.2,A=0,X=-.1,Y=-.1],-0.25

This has the effect of keeping the text at the same angle regardless of the line's direction. Notice that in this sample, the X and Y values are -.1; this will center the Gs on the line. The scale value of .2 will cause the text to be 0.2 units high, so -.1 is half the height.

In addition to fonts, you can specify shapes for linetype definitions. Instead of letters, shapes display symbols. Shapes are stored not as drawings but as definition files, similar to text font files. Shape files have the same .shx filename extension as font files and are also defined similarly. Figure 28.28 shows some symbols from sample shape files. The names of the files are shown at the top of each column.

To use a shape in a linetype code, you use the same format as shown previously for text. However, instead of using a letter and style name, you use the shape name and the shape filename, as in the following example:

*Capline, ====
a,1.0,-0.25,[CAP,ES.SHX,S=.5,R=0,X=-.1,Y=-.1],-0.25
Samples of shapes

Figure 28.28. Samples of shapes

This example uses the CAP symbol from the Es.shx shape file. The symbol is scaled to 0.5 units with 0 rotation and an X and Y displacement of −0.1.

Here is another example that uses the arrow shape:

*Arrowline, -|-|-|-
a,1.0,-0.25,[ARROW,ES.SHX,S=.5,R=90,X=-.1,Y=-.1],-0.25

Just as with the Capline example, the ARROW symbol in this example is scaled to 0.5 units with 0 rotation and an X and Y displacement of −0.1. Figure 28.29 shows what the Arrowline linetype looks like when used with a spline.

The Arrowline linetype used with a spline

Figure 28.29. The Arrowline linetype used with a spline

In this example, the Ltype generation option is turned on for the polyline. Note that the arrow from the Es.shx sample shape file is used for the arrow in this linetype.

Creating Hatch Patterns

AutoCAD provides several predefined hatch patterns you can choose from, but you can also create your own. This section demonstrates the basic elements of pattern definition.

Unlike linetypes, hatch patterns can't be created while you're in an AutoCAD file. The pattern definitions are contained in an external file named Acad.pat. You can open and edit this file with a text editor that can handle ASCII files, such as Windows Notepad. Here is one hatch pattern definition from that file:

*square,Small aligned squares
0, 0,0, 0,.125, .125,-.125
90, 0,0, 0,.125, .125,-.125

You can see some similarities between pattern descriptions and linetype descriptions. They both start with a line of descriptive text and then give numeric values defining the pattern. However, the numbers in pattern descriptions have a different meaning. This example shows two lines of information. Each line represents a line in the pattern. The first line determines the horizontal line component of the pattern, and the second line represents the vertical component (see the image to the far right in Figure 28.30). A pattern is made up of line groups. A line group is like a linetype that is arrayed a specified distance to fill the area to be hatched. A line group is defined by a line of code, much as a linetype is defined. In the square pattern, for instance, two lines—one horizontal and one vertical—are used. Each of these lines is duplicated in a fashion that makes the lines appear as boxes when they're combined. Figure 28.30 illustrates this point.

The individual and combined line groups

Figure 28.30. The individual and combined line groups

Look at the first line in the definition:

0, 0,0, 0,.125, .125,-.125

This example shows a series of numbers separated by commas. It represents one line group. It contains four sets of information, separated by blank spaces:

  • The first component is the 0 at the beginning. This value indicates the angle of the line group, as determined by the line's orientation. In this case, it's 0 for a horizontal line that runs from left to right.

  • The next component is the origin of the line group, 0,0. This doesn't mean the line begins at the drawing origin (see Figure 28.31). It gives you a reference point to determine the location of other line groups involved in generating the pattern.

    The origin of the patterns

    Figure 28.31. The origin of the patterns

  • The next component is 0,.125. This determines the distance and direction for arraying the line, as illustrated in Figure 28.32. This value is like a relative coordinate indicating X and Y distances for a rectangular array. It isn't based on the drawing coordinates, but on a coordinate system relative to the orientation of the line. For a line oriented at a 0° angle, the code 0,.125 indicates a precisely vertical direction. For a line oriented at a 45° angle, the code 0,.125 represents a 135° direction. In this example, the duplication occurs 90° in relation to the line group, because the X value is 0. Figure 28.33 illustrates this point.

  • The last component is the description of the line pattern. This value is equivalent to the value given when you create a linetype. Positive values are line segments, and negative values are blank segments. This part of the line group definition works exactly as in the linetype definitions you studied in the previous section.

This system of defining hatch patterns may seem somewhat limiting, but you can do a lot with it. Autodesk managed to come up with 69 patterns—and that was only scratching the surface.

The distance and direction of duplication

Figure 28.32. The distance and direction of duplication

How the direction of the line group copy is determined

Figure 28.33. How the direction of the line group copy is determined

The Bottom Line

Use workspaces

Often with AutoCAD, you find that you have different sets of panels or toolbars open to perform specific tasks. You might have one set of Ribbon panels for editing text and dimensions, whereas another set is more useful for design. Workspaces are a great way to organize your different editing modes.

Master It

Where do you find the Customize option for workspaces?

Customize the user interface

In addition to using workspaces to organize toolbars and Ribbon panels, you can customize the AutoCAD interface to make it fit the way you like to work. You can add tools to Ribbon panels or even create your own tools for operations you perform frequently.

Master It

What does the Customizations In All Files group display?

Create macros in tools and menus

A macro is a set of instructions that performs more complex operations than single commands. Macros are often built on commands with additional predefined responses to help speed data input.

Master It

What does the ^C do in a macro?

Edit keyboard shortcuts

Keyboard shortcuts can help improve your speed when drawing in AutoCAD. They can reduce several clicks of the mouse to a simple keystroke. AutoCAD lets you create custom shortcuts for your favorite commands.

Master It

What is the keyboard shortcut for Copy?

Save, load, and unload your customizations

To keep your customizations organized, you can save new toolbars, menus, and Ribbons as files that you can load on demand. When you save your custom elements as a file, you can move them to other computers.

Master It

Name the tab that contains the group you use to save your custom elements.

Understand the Diesel macro language

If you're adventurous, you may want to try your hand at creating more complex macros. The Diesel macro language is an easy introduction to AutoCAD macro customization and is most useful in controlling the behavior in menu options.

Master It

What does the expression $(getvar, blipmode) do?

Create custom linetypes

AutoCAD offers a number of noncontinuous linetypes, and you may find them adequate for most of your work. But every now and then, you may need a specific linetype that isn't available. Creating custom linetypes is easy once you understand the process.

Master It

What is the purpose of a negative value in the linetype code?

Create hatch patterns

Like linetypes, the hatch patterns provided by AutoCAD will probably fill most of your needs. But every now and then, you may need to produce a specific pattern.

Master It

How are a hatch pattern code and a linetype code similar?

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.182.45