Читать книгу AutoCAD Platform Customization - Ambrosius Lee - Страница 24

Part I
AutoCAD Customization: Increasing Productivity through Personalization
Chapter 2
Working with Nongraphical Objects
Creating and Managing Annotation Styles

Оглавление

Annotation styles play a significant role in the communication of your design to those who will sign off on the project or be involved in manufacturing. AutoCAD supports four primary annotation styles that affect the appearance of text, dimension, table, and multileader objects. The following sections explain the basics of creating and editing these annotation styles.

Text Heights

The height at which any text should be created is based on where the text will reside: model space or paper space. Text created in model space (using the Model tab) is commonly scaled up because the objects represent real-world objects that are being designed and drawn at full scale and then are scaled down when plotted or printed to fit on a sheet of paper.

Text at a height of 3/16″ (or 0.1875 inches) is very small in model space if you normally use a plot scale of 1/8″ = 1′-0″ or 100:1 for your drawings. The text would be plotted at about 0.0019 inches high, or basically a dot on the drawing. To get an acceptable size for your text in model space, you take the text height you want the final text to appear, say 3/16″, and multiply it by the expected plot scale (1/8″ = 1′-0″ is equal to 96). So you take (3/16) × 96 to calculate the final text height of 18″ to be used for text in model space. On the other hand, 18″ is way too large for text in paper space. Here, you would use the actual text height of 3/16″ since you commonly plot or print a layout at a scale of 1:1.

Things can get complicated even further if you plot parts of your drawing at different scales since your text would not look the same when plotted at a scale of 1/4″ = 1′-0″ as it would at 100:1. The issue of dealing with multiple plot scales in a drawing can be addressed with one of two solutions:

• Use different layers and create multiple text objects at different heights; then control which objects should be displayed in a viewport at a specific scale or when the drawing is plotted. Managing multiple layers and annotation objects was once the only choice, but it is still the common choice for some companies.

• Use annotative scaling to dynamically scale text up or down based on the scale at which the object is being viewed through a viewport or plotted. I discuss annotative styles and annotation scaling in the section “Annotative Styles and Annotation Scaling” later in this chapter.

Text Styles

Text styles are used to define how text within a drawing will look or behave when created, but not what the contents of the text will be. For example, a text style defines which font will be used to control the appearance of the characters within a text object, if the text is bold or italicized, the default height of the text, or if the object will be annotative when a new text object is created.

Text styles in AutoCAD can be defined to use one of two font types:

Shape (SHX) Fonts Shape fonts are optimized for and only work with AutoCAD. Shape fonts are defined through a series of vectors, which make them more efficient than TrueType fonts. Shape fonts are also used when specifying a Big Font file to use for Asian languages. You can create your own custom fonts or characters by defining them in a Shape (SHP) file. I discuss creating shapes in Chapter 9.

TrueType (TTF) Fonts TrueType fonts are common to the operating system and other applications on a workstation. They offer a wider range of looks than the SHX files do, but they can impact the performance of zooming and object selection in AutoCAD.

Make sure the fonts that you choose to use are easy to read; at the end of the day, annotation is about communicating your design, not for winning awards at an art show. The fonts you pick can affect sharing or exchanging of drawings, too. If a font is not available on a workstation that opens the drawing, a substitute font is used and the text might not appear properly. When a font is not available, AutoCAD replaces the missing font with the one specified by the fontalt system variable.

Creating and Modifying Text Styles

Text styles are created and modified using the Text Style dialog box, which is displayed with the style command. The process for creating and modifying a text style is similar on Windows and Mac OS. There are some minor differences because of the way the dialog boxes are laid out. After a text style has been created with the Text Style dialog box, you use the dialog box again to make changes by selecting the style you want to edit from the Text Styles list and changing the properties of that style. Once the property changes are made, you click Apply to save the changes. If you want to create or modify text styles using scripts or custom programs, you can use the – style command.

The following explains how to create a text style in AutoCAD on Windows:

1. On the ribbon's Annotate tab ➢ Text panel, click the panel-launcher button located to the right of the Text panel's title (or at the command prompt, enter style and press Enter).

2. When the Text Style dialog box (Figure 2.11, top) opens, click New. Enter a name for the new text style and click OK.

3. Select a TTF or SHX file from the Font Name drop-down list. Choose an option from the Font Styles drop-down list as needed. If you need to create a style with a Big Font, select an SHX font and click Use Big Font. Then, specify a font from the Big Font drop-down list.

4. Enter a text height in the Height box. The value entered becomes the default text height when you create text objects. It also affects other annotation styles that use the text style. You can create annotative text, which I cover in the section “Annotative Styles and Annotation Scaling” later in this chapter.

5. In the Effects section, specify any of the options needed for your text style.

6. Click Apply.

7. Double-click the text style you want to make current. When no objects are selected, you can also set a text style as current from the Text Style drop-down list, which is available on the ribbon's Annotate tab ➢ Text panel.

8. Click Close.


Figure 2.11 The appearance of text can be controlled with text styles.


If you are using AutoCAD for Mac, you can do the following to create a text style:

1. Click Format menu ➢ Text Style (or at the command prompt, enter style and press Enter).

2. When the Text Style dialog box (Figure 2.11, bottom) opens, click the + (plus) button located in the lower-left corner. Enter a name for the new text style and press Enter.

3. Select a TTF or SHX file from the Family list box. Choose an option from the Typeface list box as needed. If you need to create a style with a Big Font, select an SHX font and then select a font from the Asian Set list box.

4. Enter a text height in the Text Height box. The value entered becomes the default text height when you create text objects; it also affects other annotation styles that use the text style too. You can create annotative text as well, which I cover in the section “Annotative Styles and Annotation Scaling” later in this chapter.

5. Specify any of the effects in the Text Style Preview area as needed.

6. Click Apply.

7. Double-click the text style you want to make current. You can also set a text style as current from the Text Style drop-down list in the Annotation section of the Properties Inspector when no objects are selected.

8. Click Close.

Using a Text Style with Dimension, Table, and Multileader Styles

When you create a text style, you have the option to specify a default text height for use when you create new text objects. Setting a text height to a specific value also forces any dimension, table, or multileader styles that reference that text style to take on the text height to which the text style is set. Don't use a specific text height when you define text styles unless you wish to restrict flexibility in changing heights when creating text objects or using a text style with other annotation styles.

Dimension Styles

Dimension objects are made up of a number of different components, from arrowheads to extension and dimension lines to annotation objects with formatted values. All of the components that make up a dimension object are defined using dimension styles. Dimension styles allow you to control the text size and placement, dimension and extension line colors and linetypes, as well as a dimension scale, which is used to scale up or down the various components of a dimension so that they display correctly based on a drawing's plotted scale.

Dimension styles are created and modified using the Dimension Style Manager, which is displayed with the ddim command. If you want to create or modify dimension styles using scripts or custom programs, you will want to take a look at the – dimstyle command and the dozens of system variables that all begin with the letters dim.

TIP

You can use the Compare button or option from the Dimension Style Manager to see the differences between two different dimension styles.

You can create a dimension style on Windows or Mac OS with these steps:

1. Do one of the following to display the Dimension Style Manager:

• On the ribbon's Annotate tab ➢ Dimensions panel, click the panel-launcher button located to the right of the Dimensions panel's title (Windows).

• Click Format menu ➢ Dimension Style (Mac OS).

• At the command prompt, enter ddim and press Enter (Windows and Mac OS).

Figure 2.12 shows the Dimension Style Manager as it appears in Windows (top) and Mac OS (bottom).

2. In the Dimension Style Manager, click New (Windows) or the + (plus) button (Mac OS).

3. In the Create New Dimension Style dialog box, enter a name for the new style.

4. Optionally, do the following:

• Select an existing style to start with and check Annotative if you want to create an annotative style. I discuss annotative styles in the section “Annotative Styles and Annotation Scaling” later in this chapter.

• Select an option from the Use For drop-down list to have the new dimension style apply only to a subset of dimension objects. Typically, keep the Use For drop-down list set to All Dimensions.

5. Click Continue.

6. When the New Dimension Style dialog box opens, start on the Lines tab and change the settings as needed.

7. Continue making changes on each tab in the dialog box.

8. Click OK to return to the Dimension Style Manager.

9. Right-click the dimension style you want to make current and click Set Current. When no objects are selected in AutoCAD on Windows, you can also set a dimension style as current from the Dimension Style drop-down list on the Annotate tab ➢ Dimensions panel on the ribbon. When no objects are selected in AutoCAD for Mac, you can set a dimension style as current from the Dimensions Style drop-down list in the Annotation section of the Properties Inspector.

10. Click Close.


Figure 2.12 Creating and defining dimension styles


You can edit a dimension style by doing one of the following when the Dimension Style Manager is displayed:

• Select a dimension style from the Styles list box and click Modify (Windows).

• Select a dimension style from the Styles list box, click the Action button (the gear icon), and then click Modify (Mac OS).

Dimension overrides, which allow you to apply a temporary change to a style, can also be created. The changes based on the overrides are added to new objects that are created when the dimension style is current; existing dimensions are not affected by the override. You create an override to a dimension style much like you would modify a dimension style, except that instead of clicking the Modify button/option you click Override. You can also override the properties of individual dimension objects by using the Properties palette (Windows) or Properties Inspector (Mac OS).

Table Styles

Table styles are used to control the direction in which content flows for a table, as well as the appearance of the grid border lines and textual content that appears in table cells that are assigned a given style. A table style can also contain cell styles that are used to group general formatting, text, and border settings for use in a table.

AutoCAD on both Windows and Mac supports the creation of tables and the use of table styles, but only AutoCAD on Windows allows you to create and modify table styles using the Table Style dialog box (shown in Figure 2.13). The Table Style dialog box is displayed with the tablestyle command. Once a table is created, you can override the properties of a table and its cells using the Properties palette (Windows) or Properties Inspector (Mac OS).


Figure 2.13 Updating the properties of a table style


You can create a table style with these steps:

1. On the Annotate tab, Tables panel, click the panel-launcher button located to the right of the Tables panel's title (or at the command prompt, enter tablestyle and press Enter).

2. In the Table Style dialog box (see Figure 2.13), click New. Enter a name for the new table style and, optionally, select a style to start with. Click Continue.

3. In the New Table Style dialog box, select a table direction in the General section.

4. Optionally, click Create A New Cell Style in the Cell Styles section. In the Create New Cell Style dialog box, enter a name for the new cell style and, optionally, select a style to start with. Click Continue.

5. Select a cell style to edit from the Cell Styles drop-down list in the Cell Styles section.

6. Edit the properties for the cell style on the General, Text, and Borders tabs.

7. Click OK to return to the Table Style dialog box.

8. Select the table style you want to make current and click Set Current.

9. Click Close.

You can update a table style with the Table Style dialog box by selecting the style you want to edit from the Table Styles list and clicking Modify. Edit the properties of the style as needed, and then click OK to save the changes and exit the dialog box.

Multileader Styles

Multileaders allow you to place text, blocks, or tolerances with leader lines that point to features in your drawing. You use multileader styles to control the creation and appearance of multileader objects. A multileader style specifies the formatting of the leader line (segment types, colors, and arrowhead style), leader structure (constraints, landing, and scale), and the content that should be displayed at the end of the leader landing. Multileader styles are created and modified using the Multileader Style Manager, which is displayed with the mleaderstyle command.

You can create a multileader style on Windows or Mac OS by taking these steps:

1. Do one of the following to display the Multileader Style Manager (see Figure 2.14):

• On the ribbon's Annotate tab ➢ Leaders panel, click the panel-launcher button located to the right of the Leaders panel's title (Windows).

• Click Format menu ➢ Multileader Style (Mac OS).

• At the command prompt, enter mleaderstyle and press Enter (Windows and Mac OS).

2. In the Multileader Style Manager, click New (Windows) or the + (plus) button (Mac OS).

3. In the Create New Multileader Style dialog box, enter a name for the new style.

4. Optionally, select an existing style to start with and check Annotative if you want to create an annotative style. I discuss annotative styles in the next section, “Annotative Styles and Annotation Scaling.”

5. Click Continue. The Modify Multileader Style dialog box is displayed.

6. In the Modify Multileader Style dialog box, start on the Leader Format tab and change the settings as needed.

7. Continue making changes on each tab in the dialog box.

8. Click OK to return to the Multileader Style Manager.

9. Right-click the dimension style you want to make current and click Set Current. When no objects are selected in AutoCAD on Windows, you can also set a multileader style as current from the Multileader Style drop-down list on the Annotate tab ➢ Leaders panel on the ribbon. When no objects are selected in AutoCAD for Mac, you can use the Multileader Style drop-down list in the Annotation section of the Properties Inspector.

10. Click Close.


Figure 2.14 Modifying a multileader style


You can edit a multileader style by doing one of the following when the Multileader Style Manager is displayed:

• Select a multileader style from the Styles list box and click Modify (Windows).

• Select a multileader style from the Styles list box, click the Action button (the gear icon), and then click Modify (Mac OS).

Annotative Styles and Annotation Scaling

As I mentioned earlier, in the “Text Heights” section, calculating and displaying text at the correct height in a drawing can be a bit of a challenge when working with one or even several drawing scales. It can even be more time-consuming if you decide to change the scale at which your drawing should be plotted.

These problems can be solved through the use of annotative styles and annotation scaling. When you use annotative styles and annotation scaling, you specify the final height for your text objects and AutoCAD does the calculations for you based on the scale assigned to a viewport or when a drawing is plotted. For example, you set a text style to be annotative and then specify a paper height (the size the text should appear on the drawing when plotted). Specifying a text height of 1/8″ means that the text will appear as 1/8″ on the sheet of paper as long as you have assigned the correct annotation scales to the text object. Entering 1/8″ is so much easier than calculating a text height of (1/8) × 96 = 12, so your text is printed as 1/8″ high when your viewport is set to a scale of 1/8″ = 1′-0″.

Okay, there are a few additional steps that need to happen, but it is much easier to let AutoCAD manage the display of annotation objects based on the current annotation scale than to create a large number of annotation objects at different sizes on different layers. The following styles can be set as annotative, which results in the creation of objects that are annotative and react to the current annotation scale in a drawing:

• Dimension styles

• Multileader styles

• Text styles

The following objects can be created using annotative styles or by enabling the Annotative property using the Properties palette (Windows) or Properties Inspector (Mac OS):

• Attribute definitions

• Block definitions/references

• Dimensions

• Geometric tolerances

• Hatch objects

• Multileaders

• Single-line and multiline text

Creating an Annotative Style

You can use the following to create an annotative text, dimension, or multileader style:

Text Style Create a text style as explained earlier, in the “Creating and Modifying Text Styles” section. Then, before saving the new style, in the Text Style dialog box check Annotative in the Size section in AutoCAD on Windows or click the Annotative toggle in AutoCAD for Mac. Enter the final height for the text in the Paper Text Height text box, and optionally click the Match Text Orientation To Layout check box (Windows) or toggle (Mac OS). Now the size of the text will be scaled up or down based on the annotation scales assigned to the single-line or multiline text objects that are created with that style current.

Dimension Style Create a dimension style as explained earlier, in the “Dimension Styles” section. Then, before saving the new style, in the New/Modify Dimension Style dialog box select the Fit tab and check Annotative in the Scale For Dimension Features section. Now the size, text height, and other distances that affect the appearance of dimension objects are scaled up or down based on the annotation scales assigned to the dimension objects that are created with that style current.

Multileader Style Create a multileader style as explained earlier, in the “Multileader Styles” section. Then, before saving the new style, in the Modify Multileader Style dialog box select the Leader Structure tab and check Annotative in the Scale section. Now the size, text height, and landing gap values on the Leader Format and Content tabs are scaled up or down based on the annotation scales assigned to the multileader objects that are created with that style current.

I explain creating annotative blocks in Chapter 3, “Building the Real World One Block at a Time.”

Managing Annotation Scales for an Object

After an annotation object is created with an annotative style current or the object's Annotative property is enabled with the Properties palette (Windows) or Properties Inspector (Mac OS), you need to assign the annotation object one or more annotative scales. Annotative scales can be assigned to an annotation object using the objectscale command, or with the Annotative Scale property in the Properties palette (Windows) or Properties Inspector (Mac OS) when the object is selected.

Each annotative scale assigned to an annotation object creates an additional representation of the object; this allows you to control the placement of each representation independently while managing the content through a single object. Which representation of an annotation object should be displayed is determined by the current annotation scale of a viewport or when the drawing is plotted. For example, you can assign the annotative scales of 1/4″ = 1′-0″ and 1/8″ = 1′-0″ to your annotation objects, and if a viewport is set to the scale of 3/16″ = 1′-0″ none of the annotation objects are displayed. This is because your annotation objects were only assigned the scales of 1/4″ = 1′-0″ and 1/8″ = 1′-0″.

The current annotation scale for a viewport can be specified using the Annotation Scale drop-down list on the status bar. This value determines which annotation objects are displayed in the drawing based on their assigned annotative scales. You can add annotative scales automatically to all annotation objects when switching the value of the Annotation Scale drop-down list by enabling Automatically Add Scales To Annotative Objects on the status bar. If you are working in a drawing that has annotative objects with multiple annotative scales assigned to them, you might want to enable the Annotation Visibility option on the status bar as well so that you can adjust the placement of each representation of your annotation objects without switching between annotation scales.

AutoCAD Platform Customization

Подняться наверх