Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
autocad_2013_for_dummies.pdf
Скачиваний:
24
Добавлен:
19.02.2016
Размер:
24.71 Mб
Скачать

384 Part IV: Advancing with AutoCAD

Many people use attributes in the way we’ve described so far — as fill-in-the- blank text fields in blocks. But attributes also can serve as data extraction tools. For example, you can export attribute values, such as part numbers and quantities, to a table object in AutoCAD or to a text, spreadsheet, or database file for analysis or reporting.

Extracting data

Selecting Extract Data from the Linking & Extraction panel on the Ribbon’s Insert tab starts the Data Extraction Wizard. You can find out much more about this specialized function in the online help. Check out User’s Guide Share Data between Files Extract Data from Drawings and Spreadsheets. And, AutoCAD LT users, although you don’t have this wizard, you can still extract attribute information to spaceor comma-delimited text files by using the Attribute Extraction dialog box. For more information, visit the online help.

Exploding Blocks

In regular block definitions (not dynamic blocks), the objects in each block reference act like a well-honed marching squadron: If you move or otherwise edit one object in the block reference, all objects move or change in the same way. Usually this cohesion is an advantage, but occasionally you need to break up the squadron in order to modify one object without affecting the others.

To explode a block reference into individual objects, click Explode on the Home tab’s Modify panel or type X and press Enter, and then select the block reference. When you explode a block reference, AutoCAD replaces it with all the objects — lines, polylines, arcs, and so on — specified in the block definition. You then can edit the objects individually or perhaps use them to make more block definitions.

If you explode a block that contains attributes, the attribute values change back to become attribute definitions. This usually isn’t the sort of change that you want. If you really need to explode the block reference, you’ll probably want to erase the attribute definitions and draw regular text strings in their place. If you’ve installed the AutoCAD Express Tools (not available in AutoCAD LT), you can perform this task automatically with the BURST command. Just type BURST and press Enter.

Both AutoCAD and AutoCAD LT have an NCOPY command that you can use to copy objects contained within blocks without having to explode the block. AutoCAD users familiar with the Express Tools may already be familiar with NCOPY; the command is now in the core of the program and therefore available to LT users. In both versions, you can find the Copy Nested Objects tool on the Home tab’s Modify panel slideout (or you can simply type NCOPY).

www.it-ebooks.info

Chapter 17: The ABCs of Blocks 385

Purging Unused Block Definitions

Each block definition increases the size of your DWG file, as do other named objects, such as layers, text styles, and dimension styles. In the case of a large, complex block definition, the size increase can be significant. If you delete (or explode) all the block references that point to a particular block definition, that block definition no longer serves any purpose.

You should run the PURGE command periodically in each drawing and purge unused block definitions. Click the Application button to open the Application Menu, choose Drawing Utilities on the left side, and then choose Purge to display the Purge dialog box. Click the Purge All button to purge all unused named objects in the current drawing.

PURGE isn’t only for blocks: You can also remove empty layers, blank text strings, zero-length lines, empty groups, and unused style definitions. In Figure 17-7, the Purge dialog box shows the unused dimension, multileader, and text styles that can be removed from this drawing with a click of the Purge All button.

Figure 17-7: Purging your drawing of unneeded named objects.

www.it-ebooks.info

386 Part IV: Advancing with AutoCAD

Note the Purge Nested Items check box. Some items may not become unused until something else is purged. For example, a block definition can contain one or more other block definitions as components of it, and they in turn can contain others. If the parent contains the only use of a child or grandchild, purging the parent releases the child and so on down. When Purge Nested Items is selected, AutoCAD tunnels down through the nestings, looking for new orphans. These may include block definitions, and/or things like layer, text style, and dimension style specifications.

www.it-ebooks.info

18

Everything from Arrays to Xrefs

In This Chapter

Introducing associative arrays, external references (xrefs), raster images, and dynamic blocks

Creating associative arrays

Attaching and managing xrefs, DWFs, and PDFs

Controlling xref paths

Importing other file formats

Attaching and managing raster image files

Authoring dynamic blocks

We introduce simple arrays in Chapter 11. They’ve served us well for many years, but they’re basically just a quick way of pro-

ducing multiple copies of drawing objects in regular patterns.

In this chapter, we discuss AutoCAD’s associative array feature. Associative arrays are also dynamic: that is, you can edit them by changing the number of items, changing the definition of the objects being arrayed, or substituting a different object set for one or

more object sets in an array.

An external reference drawing — xref — is like an industrial-strength block. An xref is a pointer to a separate drawing file outside the drawing you’re working on. When you attach a reference drawing, it appears onscreen and on plots as part of your drawing, but it continues to live as a separate document on your

hard drive or network. If you edit the externally referenced drawing, the appearance of the drawing changes in all drawings

that reference it. Like a block insertion, an xref attachment increases the drawing file only slightly, regardless of the size of the xref file.

www.it-ebooks.info

388 Part IV: Advancing with AutoCAD

A raster image file stores a graphical image as a series of dots. BMP and JPG images seen on the Internet or from a digital camera are typical examples. Raster files are good for storing photographs, logos, and other images. AutoCAD vector files are good for storing geometrical objects, such as lines and arcs, along with text and other annotations for describing the geometry. Sometimes combining raster images with AutoCAD vector files by attaching them to your drawing files is handy, and the External References palette makes the process straightforward.

Before AutoCAD 2007, external references meant AutoCAD drawing files (and only AutoCAD drawing files) that you attached to your current drawing. Images were (and still are) raster graphics files that you attached in a similar way but with a different command. In AutoCAD 2007 and later, you

use the External References palette to attach and manage not only externally referenced AutoCAD drawings (xrefs) and 2D MicroStation DGN drawing files, but also image files and DWF or PDF underlays. (DWF stands for Design Web Format; a DWF is a lightweight version of a DWG file intended for design review or posting on a website.) We discuss attaching DWFs or PDFs as external references at the end of this chapter, and describe the web functions of DWFs in Chapter 20.

Both AutoCAD and AutoCAD LT enable you to attach DGN files to current drawings via the External References palette. DGN files are drawing files created by one of AutoCAD’s competitors: MicroStation from Bentley Systems. (You can also import and export DGN drawing data in both AutoCAD and AutoCAD LT.) If you’re new to AutoCAD, you’re not likely to encounter DGN files unless you’re working for a large company that exchanges a lot of drawings with partners and consultants. For more information on DGN files in AutoCAD 2013, enter DGN Files in the Search box at the top of the online help home page.

As we mention in Chapter 17, blocks, external references, DWF underlays, PDF underlays, raster images, and DGN files enable you to reuse your work and the work of others, giving you the potential to save tremendous amounts of time — or to cause tremendous problems if you change a file on which other people’s drawings depend. Use these features when you can to save time, but do so in an organized and careful way to avoid problems.

In Chapter 17, we introduce blocks as collections of object geometry that are treated as single entities in AutoCAD. In that chapter, we also describe

giving blocks a little more oomph by adding attributes — changeable text tags that can differ with each insertion. Other than that kind of slight variation, though, the blocks that we describe in Chapter 17 tend to be pretty static.

www.it-ebooks.info

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]