Deleting Named Objects

Often you will find unneeded layers or linetypes; you should delete these objects from the drawing to clean up the drawing database.

The act of removing a named object from the database is referred to as purging the object. This action is performed with the new PURGE dialog box introduced in AutoCAD 2000i, which is invoked by choosing Purge from the Drawing Utilities submenu of the File menu (see Figure 11.29). From the dialog box, you can choose to purge all named objects or limit the command to a specific type of named object, such as text styles.

Figure 11.29. The Purge dialog box provides an intuitive interface.


Tip

The traditional method of purging is still available via the -PURGE command, if so desired.


Named objects that are not used, such as a layer with no objects drawn on it, are referred to as unreferenced objects. Only unreferenced objects can be purged from a drawing. Whenever PURGE finds a named object suitable for deletion, you are prompted to confirm the deletion prior to the object being deleted.

Note

Layer 0 can never be purged, even if it is unreferenced and unused.


Although saved User Coordinate Systems, views, and viewport configurations are named objects and can be renamed with the RENAME command, PURGE does not give you the option to delete these types of objects. Instead, if you want to remove these objects, you must use the command that manages them. For example, you cannot use PURGE to delete a named view. Instead, you must use the right-click shortcut menu item Delete in the View dialog box to delete a named view. Use UCSman to delete a named UCS and use Vports to delete named viewport configurations.

Tip

An additional method to “purge” a drawing of all unreferenced objects (except saved UCSs, views, and viewport configurations) is to use the EXPORT command (see Chapter 25). The EXPORT command enables you to create a new drawing file and then specify the asterisk (*) wildcard character as the block name to be exported.

The * option specifies both that the entire drawing should be exported to the new drawing file and that all unreferenced named objects should not be saved to the new drawing. The name of the new drawing created can be the same as the current drawing. In this case, you essentially replace the current version of the drawing with a new purged version. If you have given the new drawing the same name as the current drawing, don’t save changes when you exit the current drawing or you will overwrite the new drawing that you just exported. So then close, without saving, and open the same drawing again—but this time being the exported drawing.


In the following exercise, you will purge an unreferenced layer and rename another.

Exercise 11.6 Renaming Blocks and Purging Layers

1.
Open the drawing CHAP11-3.DWG found on the accompanying CD-ROM.

2.
Choose Rename from the Format pull-down menu, and choose Blocks from the Named Objects list.

3.
Choose boxbot from the Items list. This automatically fills in boxbot into the Old Name edit box.

4.
Type BOTBOX in the Rename To edit box as shown in Figure 11.30, then click the Rename To button.

Figure 11.30. The Rename dialog box allows quick access to rename named objects such as blocks.


5.
Click OK to exit the Rename dialog box. Now the name change has been applied to the block.

6.
To purge layer TOPBOX from this drawing, choose the File pull-down menu, then Drawing Utilities, Purge.

7.
Be sure the View Items You Can Purge button is clicked and then look in the Items Not Used In Drawing listing. In the Named Objects column select Layers.

8.
Notice the Layer category is not expandable and you see no layers that can be purged. This means that no layers are available at all; nothing is unreferenced. You must remove all objects from a given layer in order to purge that layer.

9.
Click the Close button to dismiss the dialog.

Note

If you tried to use the -PURGE command instead, the command would have responded with No unreferenced layers found. Because this drawing has objects on the existing Layers 0, BOXBOT, and TOPBOX, and no other empty layers exist, the PURGE command could not purge anything. To successfully accomplish the purging of a layer, you need to remove these objects and purge the layers again.

10.
Select the ERASE command from the Modify pull-down menu and type ALL at the Select objects: prompt. Press Enter to remove all drawing objects and exit the command.

11.
Start the PURGE command again by typing PURGE and pressing Enter. This time the Items Not Used In the Drawing listing has a [+] by the Layer category.

12.
Click the word Layer, and then the Purge button at the bottom of the dialog becomes available. Click the [+] to expand. Now you can see what layer name is available to purge.

13.
Click the layer name BOXBOT to highlight.

If you choose a single name and then click the Purge button, only that named object is removed. If you click the category name (those that have items under them) then all available objects in that category will be purged, one at a time.

14.
Click the Purge button and a Confirm Purge box appears. Click Yes to proceed and remove the layer. Then click Close to dismiss the dialog.

You were not asked to purge TOPBOX and you didn’t see it in the listing. This is because that layer is current and not available for purging.

15.
Set layer 0 to be current by selecting it from the Layer drop-down list. This enables you to purge the layer TOPBOX because the PURGE command will not purge the layer that’s current.

16.
Repeat steps 11 to 14 and purge the TOPBOX layer. The layer is now removed from the drawing. You may then exit this drawing without saving changes.

As seen in the exercise, renaming and purging objects in your drawings is an easy task to accomplish. Regular usage of these commands will keep drawings clean and maintain minimal file sizes.

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

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