Chapter 24
IN THIS CHAPTER
Exporting AutoCAD DWG files to other file formats
Importing other file formats into AutoCAD
Dealing with translation issues
So your drawing masterpiece is ready to go. Chapter 16 covers plotting to paper, and Chapter 20 discusses the gory details of transmitting drawing files via the Internet. So far, so good. But what if you want to include all or part of a drawing as an illustration in a written report? What if you need to send a drawing to someone who is using a CAD program other than AutoCAD? No problem. This chapter starts by discussing several different processes for extracting drawing information in a variety of file formats.
Next, we come to the flip side. What if you receive a drawing file that isn’t in DWG format? Okay, maybe not a problem. AutoCAD can import and edit several other file formats.
This chapter concludes with a section on some of the possible pitfalls of dealing with file format translations.
AutoCAD has several processes for exporting drawings in formats other than DWG. In fact, it often has more than one process for the same format.
In Chapter 1, I discuss the difference between the two fundamental file formats for storing graphic images. Virtually all CAD programs use a vector format, in which the file contains definitions and properties for each object type such as a line, a circle, and an arc. Most other graphic programs use some variant of a raster (bitmap) format, wherein the file simply contains a mapping of the color of each of the tiny dots (pixels) that produce the image on screen.
The bad news is that if you want to include CAD drawings in most non-CAD applications, well, many cannot handle a vector format. The good news is that AutoCAD can produce a raster file that can then be inserted into things like a Word document file.
The most basic raster image file is a simple bitmap, usually with the file extension BMP (usually pronounced “bump”). The file consists mostly of a whole bunch of numbers that correspond to a color number for every individual pixel. One problem with BMP files is that they are not compressed, so as the resolution (the number of rows and columns) goes up, the file size goes up exponentially. If you, say, double the resolution, the file size quadruples.
The file size problem can be greatly reduced by using any one of several file compression techniques. The basic principle of file compression is that the software looks for repetitions and then describes them appropriately. For example, if green is color number 3, a horizontal green line in a BMP file would be stored as “3 3 3 3 3 3 3 3 3 3 3 3.” A compressed file would store the same information as “12x3,” which obviously requires less space. The bad news is that some compression formats achieve higher compression rates by filtering finer details, so that “3 3 3 3 3 3 4 3 3 3 3 3” might still be stored as “12x3.” The false information is called an artifact. Artifacts may not be a problem in busy photographs but are a problem when details are lost from CAD images.
The most common compressed raster file formats are JPG (“jay-peg”), which is used by digital cameras, PNG (“ping”), which is used on websites, and TIF (“tiff”), which is used in desktop publishing.
You can extract a raster image from AutoCAD in several ways, ranging from convenient to flexible:
Use the PLOT command. Refer to Chapter 16, where I discuss plotting. The Printer/Plotter Name drop-down list includes Publish to Web JPG and Publish to Web PNG. When you select either, the Paper Size drop-down list displays a variety of image resolutions.
You may need to do a bit of playing with the Plot Area and Plot Scale values to get what you want. Extents and Fit to Paper are usually good starting points.
The three panels of Figure 24-1 show possible side effects of resizing a raster image.
Many people are familiar with the common image formats that I mention earlier in this chapter because they are in widespread use on the Internet. What most people, including dedicated CAD geeks, don’t know is that Windows supports a vector format called a Windows Meta File (WMF, pronounced “wmf”).
Many Windows applications, Word in particular, let you insert a WMF file as an illustration. The big advantage of this is that WMF is a mixed raster-vector file format, which means that you can zoom in or out all you want without losing details. Oh, small stuff may not be visible if you zoom out too far, but it hasn’t gone away if you zoom back in. After you insert a WMF file into a Word document, you can resize it at will to fit the available space without losing clarity or detail.
Microsoft Paint will also open a WMF file but will convert it to a BMP image.
To export a drawing in the WMF format, just do the following:
On the Application menu, choose Export ⇒ Choose Other Formats.
The Export Data file dialog box appears.
When AutoCAD asks, select the drawing objects to be exported.
When you finish selecting, the file is created.
Fortunately, there is a simple solution. By the way, have you noticed that I almost never bring up a problem unless I also have a solution? Anyway, all you need to do is to be in the desired paper space layout. Now go to the Application menu, choose Save As, and then click Save Layout as a Drawing. From here, the steps are self-explanatory. All visible objects from both universes are collected, and then everything is copied into the model space of a new drawing. Now you can export the new drawing as a WMF file.
The PDF file format by Adobe Systems has become the de facto standard for many types of information exchange. Much of this derives from its name: PDF stands for Portable Document Format. In the early days of computing, a document created on the PC version of Word couldn’t be opened by the Mac version and vice versa. On the other hand, a PDF file can be opened and displayed by any Windows or Mac computer or any iOS or Android device, such as a tablet or an iPhone. All you need to view it is the appropriate free reader app from Adobe.
To generate a PDF version of an AutoCAD DWG file, simply go to the Application menu and choose Export ⇒ PDF. The rest is pretty obvious.
The AutoCAD DWG format works well for storing drawing information on local and network drives, but the high precision and large number of object properties that AutoCAD uses make for comparatively large files.
To overcome this size problem and to encourage people to publish drawings on the web, Autodesk developed an alternative lightweight vector format for representing AutoCAD drawings: Design Web Format (DWF, pronounced “dwiff”). A DWF file is a more compact representation of a DWG file. DWF uses less space because it’s less precise and doesn’t have all the information that’s in the DWG file. Therefore, it takes less transfer time over the web and by email.
Use the EXPORTDWF command to create a DWF file. Click the Application menu and then click the Export button to use the EXPORTDWF command.
On the other hand, Autodesk seems to have come to the realization that PDF is the dominant force in this area and no longer fully supports DWF.
Okay, all you old Star Trek fans! The Matter Replicator exists! Well, not really, but 3D printing is getting pretty close. The good news is that this section of the book is short.
AutoCAD is able to export 3D solids and watertight 3D meshes in the industry-standard STereoLithography (STL) file format, which can be used by virtually any type, brand, and model of 3D printer. I cover 3D in Chapter 21.
To export an STL file, follow these steps:
On the Application menu, choose Export ⇒ Choose Other Formats.
The Export Data file dialog box appears.
Between them, AutoCAD’s print, export, save as, and publish functions can export drawing files into about 30 different file formats. These formats includes the ones already discussed in this chapter, plus several other CAD formats. Plus AutoCAD can roll newer AutoCAD files back to earlier releases.
Among other things, Chapter 18 discusses how and why to attach raster images, PDF files, and external references (XREFs) to an AutoCAD drawing file.
AutoCAD can also create, open, edit, and save a number of other file formats, including several other brands of CAD software. I won’t go into all the ins and outs here, but I will give you a hint: On the Application menu, look at the options under Open and under Import, and then click the Files of Type drop-down list to see the list of supported formats.
AutoCAD 2017 added the capability of editing PDF files. From a practical point of view, this is viable only if the PDF was created by exporting a drawing file from AutoCAD or another CAD program. Yes, AutoCAD can edit a PDF that came from a Word document, for example, but trust me, you don’t want to do that.
To edit a PDF drawing, do this:
Click Open.
The Import PDF dialog box shown in Figure 24-2 appears.
Click OK.
For your first try, I suggest you go with the defaults.
Magic! This looks exactly like the original drawing that was used to create the PDF! Even all the text, dimensions, colors, layers, and linetypes are correct.
Yes, AutoCAD can now edit a PDF file, but (and it’s a big, uppercase, bold BUT — not to be confused with a big butt) before you get all excited at the prospect, you may want to consider the following discussion of some of the limitations. It’s possible that these may be inherent in the PDF format or with AutoCAD’s capability to analyze the file or both.
First, all complex object types have been exploded to their basic constituents. For example, all block insertions, hatch patterns, text, and dimensions have been reduced to a bunch of individual polylines. That’s right, every line segment in a complex hatch pattern has become an individual, independent polyline segment. Similarly, dimensions get exploded to polylines and text, and are no longer associated with the original definition points.
Worse yet, some text is totally exploded. TrueType fonts survive as lines of text, but the individual characters in AutoCAD’s SHX fonts get redefined as a bunch of polyline segments.
I’m not finished! Curves such as splines and arcs also end up as a multitude of straight polyline segments.
Ah, but I saved the worst for last. In Chapter 8 in particular, I harp on the need for accuracy in AutoCAD drawings. Unfortunately, the PDF file didn’t read that chapter, and so most objects seem to come in with sizes that vary from the original drawing in the third and fourth decimal place. This may not sound like much, but you will now find that a line that is supposed to be tangent to an arc or two lines that are supposed to touch at their ends possibly don’t.
Other than that, PDF editing is perfect.
Okay, the good news is that later releases have greatly improved on importing PDF files. I won’t go into all the gory details, but two significant ones follow:
AutoCAD SHX fonts: AutoCAD created their proprietary font file, known as SHX fonts, in the days before standard TrueType fonts. Most current drawings probably use TrueType fonts, but older drawings or current drawings started from an older template will use SXH fonts. If you insert a PDF file and encounter text that consists of many small line segments instead of individual characters, you have SHX characters.
AutoCAD 2018 added the capability to convert all those little line segments into text. Click the Recognize SHX Text button on the Insert tab of the Ribbon. You will be invited to select objects that you believe to be text. AutoCAD will then analyze them and try to match them to one of four of its most probable SHX fonts. If it succeeds, it will produce a single editable text object of all the characters. If it fails, you need to use the SEttings option of the command to select one or more fonts out of 78 possible ones. The good news is that AutoCAD remembers any selected fonts for future conversion attempts.
As indicated earlier in this chapter, AutoCAD can both import and export drawing files from several brands of CAD software.
You have probably guessed by now that AutoCAD isn’t the only CAD program on the market, nor is it even the only one that can process files with the DWG format. A number of programs, ranging from lower-cost to free, claim to be AutoCAD compatible.
Varying degrees of “compatible” exist, and compatibility isn’t necessarily a function of price. Degrees of compatibility range from AutoCAD object types that don’t exist in the compatible programs but can still be displayed to objects that can be damaged or destroyed by a round trip.
Examples of some of the varying degrees of compatibility include the following:
The bottom line is that you should conduct round-trip cycles on test files before committing hard data.
To take full advantage of AutoCAD in your work environment, be aware of the DWG file format — the format in which AutoCAD saves drawings. Here are some DWG facts to keep in mind:
You can use the Save As option in a newer release to save a file to an older DWG format. In fact, AutoCAD 2020 can Save As all the way back to AutoCAD Release 14, in the last millennium (1997). In addition, you can save a file as a simple text-based DXF format as far back as Release 12 (1992). Table 24-1 shows which versions use which DWG file formats.
Earlier formats may not support all the features of later formats. AutoCAD does its best at translating, but some items may be lost or may not fully survive the round trip to an older release and back to the newer one.
TABLE 24-1 AutoCAD Versions and DWG File Formats
AutoCAD Version |
AutoCAD LT Version |
DWG File Format |
AutoCAD 2018-2020 |
AutoCAD LT 2018-2020 |
AutoCAD 2018 |
AutoCAD 2013–2017 |
AutoCAD LT 2013–2017 |
AutoCAD 2013 |
AutoCAD 2010–2012 |
AutoCAD LT 2010–2012 |
AutoCAD 2010 |
AutoCAD 2007–2009 |
AutoCAD LT 2007–2009 |
AutoCAD 2007 |
AutoCAD 2004–2006 |
AutoCAD LT 2004–2006 |
AutoCAD 2004 |
AutoCAD 2000, 2000i, 2002 |
AutoCAD LT 2000, 2000i, 2002 |
AutoCAD 2000 |
AutoCAD R14 |
AutoCAD LT 1998, 1997 |
AutoCAD R14 |
AutoCAD R13 |
AutoCAD LT 1995 |
AutoCAD R13 |
AutoCAD R11, R12 |
AutoCAD LT R2 |
AutoCAD R11 |
So, do you have to use AutoCAD to produce DWG files? The answer is no. Several low-cost to no-cost programs claim to be compatible with AutoCAD’s DWG file format. They usually come with a few crunchy bits, however.
18.221.239.148