AutoCAD Platform Customization. Ambrosius Lee

Читать онлайн.
Название AutoCAD Platform Customization
Автор произведения Ambrosius Lee
Жанр Зарубежная образовательная литература
Серия
Издательство Зарубежная образовательная литература
Год выпуска 0
isbn 9781118798911



Скачать книгу

to fix the violations found.

      Layer Translator Used to create layer mappings and align the layers of a drawing with those defined in your standards.

      Drawing Standards (DWS) Files (Windows Only)

      A drawing standards (DWS) file is the same as a drawing or a drawing template file, with the exception of the content it contains and its file extension. A DWS file commonly does not contain any graphical objects, but it does contain all of the named objects that are used to define your CAD standards and your layer translation mappings for the Layer Translator. For more information on named objects, see Chapter 2. I cover the Layer Translator in the “Translating Layers (Windows Only)” section later in this chapter.

      At a minimum, your DWS files should contain the following named objects:

      • Dimension styles

      • Layers

      • Linetypes

      • Text styles

      These steps explain how to save a DWG file to a DWS file using AutoCAD on Windows:

      1. In AutoCAD, open or create a DWG file that contains the named objects that represent your CAD standards. Click the Application button ➢ Save As.

      2. In the Save Drawing As dialog box, click the Files Of Type drop down-list and choose AutoCAD Drawing Standards (*.dws).

      3. Browse to a common location on the network to store the DWS file so that you and others in your company can access it.

      4. In the File Name box, enter a name for the new drawing template file. Click Save.

      Drawing standards (DWS) files are always saved in the latest file format. If you support multiple releases of AutoCAD in your company, you will want to instead save your standards to a DWG file with the oldest file format required. Once the DWG file is created, you can then just change the file's extension through the operating system.

      Configuring, Checking, and Fixing Drawing Standards (Windows Only)

      The AutoCAD Standards Manager provides you with the ability to check several of the named object types in a drawing against those defined in a drawing standards (DWS) file. Using the Standards Manager requires the completion of two distinct processes: first, you associate one or more DWS files that contain your CAD standards with the current drawing, and second, you check and fix any standards violations found.

      Configuring Standards

      Configuring a drawing to be checked for standards violations requires you to associate the DWS files that contain your CAD standards and specify which plug-ins you want to use. A plug-in defines the comparison rules that should be used to find any standards violations in the current drawing against the approved CAD standards in the DWS files. You can choose from one of four plug-ins that come with AutoCAD, you can obtain plug-ins from third-party developers, or you can develop your own plug-ins using the CAD Standards Plug-in API. You associate DWS files with a drawing using the standards command, which displays the Configure Standards dialog box.

      TIP

      You can associate DWS files with a drawing template (DWT) file. Any new drawings created from the drawing template will maintain the associations so that you do not have to go through the configuration process for each new drawing file you create.

      The following steps explain how to associate a DWS file with a drawing and specify which standards plug-ins to use:

1. On the ribbon, click Manage tab ➢ CAD Standards panel ➢ Configure (or at the command prompt, enter standards and press Enter). The Configure Standards dialog box (see Figure 1.6) is displayed.

      2. In the Configure Standards dialog box, click the Standards tab.

      You use the Standards tab to associate DWS files with the current drawing and to control the order in which AutoCAD should search the associated DWS files when validating standards. AutoCAD starts searching for named objects that match the names of those in the current drawing from the top of the list downward.

      3. Click the + (plus) button to add a new DWS file association to the current drawing. The Select Standards File dialog box is displayed.

      4. In the Select Standards File dialog box, browse to and select the DWS file that you want to associate with the drawing. Click Open.

      Only one DWS file can be associated at a time. Click the + (plus) button and add all the DWS files you want to check against.

      5. If you add more than one DWS file, select an associated DWS file and click Move Up/Move Down to change the search order of the DWS files.

      Select a DWS file and click the X to remove an associated DWS file.

6. Click the Plug-ins tab. You use the Plug-ins tab (see Figure 1.7) to specify which plug-ins should be used when checking the standards of the current drawing against the DWS files that have been associated with the drawing.

      7. Specify the plug-ins you want to use when checking for standards violations.

8. Click the Settings button. The CAD Standards Settings dialog box (see Figure 1.8) is displayed.

      9. In the CAD Standards Settings dialog box, change the settings as needed and click OK.

You can change the display behavior of the CAD Standards notification balloon and icon in the drawing status bar tray (see Figure 1.9) in the Notification Settings section. The settings in the Check Standards Settings section control how errors are handled when a drawing is checked for standards violations.

      1. Click OK to close the Configure Standards dialog box and return to your drawing.

      Based on your settings in the CAD Standards Settings dialog box, the CAD Standards icon might be displayed in the drawing status-bar tray. The tray icon, when displayed, can be used to indicate whether at least one DWS file is associated with the current drawing. Right-clicking the icon allows you to configure and check the drawing standards in your drawing.

Figure 1.6 Configuring drawing standards files

Figure 1.7 Enabling the plug-ins to use when validating drawing standards

Figure 1.8 Changing the notification and Check Standards settings

Figure 1.9 Access to CAD Standards notifications and settings is just a click away.

      Checking For and Fixing Standards Violations

      After you have associated at least one DWS file to a drawing and specified which plug-ins to use, you can check your drawing for standards violations. While you are checking for standards violations, each plug-in is executed one by one, and how a plug-in checks for standards violations can vary between plug-ins.

      The standard four plug-ins that come with AutoCAD compare the name of an object in the current drawing to the names of objects in the associated DWS files. When a match is found, AutoCAD checks to see whether the properties of the two named objects are the same. If they are the same, AutoCAD moves on to the next named object and checks it. If the properties are different, you are asked to fix or ignore the standards violation. If no matching named object is found between the drawing and DWS files, you are prompted to select one of the approved named objects from the associated DWS files or ignore the standards violation.

      Follow these steps