AutoCAD supports Autodesk's DXF (Drawing Interchange File) format, which is a text-only format that contains a 2D drawing's information. The DXF format is often used to exchange drawings between different CAD programs.
You can save a drawing in DXF format and you can open a DXF file in AutoCAD and save it as a drawing. Try this round-trip exercise.
Open a new drawing based on the default acad.dwt template.
Draw one line.
Save the drawing.
Choose File> Save As (in 2009, choose Menu Browser> File> Save As). From the Files of Type drop-down list in the Save Drawing As dialog box, choose the most recent DXF option (such as AutoCAD 2007 DXF (*.dxf).
Leave the default file name and click Save.
Close the drawing. (AutoCAD may ask you to save again in DWG format.)
Open Notepad. Choose File> Open.
In the Open dialog box, click the drop-down list that displays Text Documents (*.txt) and choose All Files (*.*).
Choose the file you just created and click Open. You'll see something like this:
In Notepad, press Ctrl + F and enter entities to find the section that contains entities (drawing objects). Here's a crib sheet for what you'll see:
Now you know a few of the DXF codes:
0: Name
10: X coordinate of start point (of a line)
20: Y coordinate of start point (of a line)
11: X coordinate of end point (of a line)
21: Y coordinate of end point (of a line)
Note: You can find all the codes in AutoCAD Help. In the Help window, click on Contents tab> AutoLISP, Visual LISP, and DXF> DXF Reference. There, you can look in the ENTITIES section for the specific codes as they apply to specific objects.
Return to AutoCAD and click Open from the Standard or Quick Access toolbar.
In the Select File dialog box, from the Files of Type drop-down list, choose DXF (*.dxf).
Choose the file you just created and click Open. The DXF file opens with your line displayed.
You can modify a drawing by editing its DXF file. Follow these steps:
In AutoCAD, use the ID command to check out the coordinates of the start and end point of the line. Write down the numbers.
In AutoCAD, close the DXF file. Don't save changes if prompted, because this will change the DXF file.
Go back to the DXF file in Notepad.
Change the numbers after the 10, 20, 11, and 21 codes. Don't change anything else.
Save the file.
Re-open the file in AutoCAD. Your line is now different, using the X and Y coordinates that you specified in the DXF file in Notepad.
Now, let's say that you have some text that you want to globally change, such as block attributes. Perhaps you want to change all instances of AB to CD. You can use the -ATTEDIT command to create global changes in attribute values, but perhaps you prefer to do this in a text environment. Here's how to do this:
Save the drawing as a DXF file.
Open the DXF file in Notepad.
Use the Find feature to search for AB. When you find it, change it to CD.
Continue on in this way.
You can even open the DXF file in WordPad or Microsoft Word and use the Replace feature. However, I don't recommend using the Replace All button, because DXF files insert lots of codes that may have the text string you want to change.
When you're done, save the file, re-open it in AutoCAD and the drawing will have the changes you made. Don't forget to save in DWG format again
This is the 9th edition of this book! Completely updated to conform to the new interface and, of course, it covers all the new features, such as the ribbon, Quick View, ShowMotion, the View Cube, the SteeringWheel, and more.
AutoCAD 2008 and AutoCAD LT 2008 Bible Learn the great new features with wide application to all disciplines. Get the most comprehensive book on AutoCAD! DVD contains a 30-day trial of AutoCAD and AutoCAD LT. Thorough exercises guide you through each feature.
AutoCAD 2007 and AutoCAD LT 2007 Bible Discover the 2007 features, especially the radically improved 3D tools. CD has AutoCAD 30-day trial, 3rd-party software, and drawings for exercises.
AutoCAD 2006 and AutoCAD LT 2006 Bible Understand and use the 2006 features,
including dynamic blocks and the new method of
customizing menus and toolbars. CD-ROM
has AutoCAD trial, software, and
drawings for all exercises.
AutoCAD 2005 and AutoCAD LT 2005 Bible
Fully explains latest
2005 features: tables,
fields, and sheet sets. For the first
time, covers AutoCAD LT! CD-ROM
comes with software and
drawings for all exercises.
AutoCAD 2004 Bible Covers all features
in detail. Hands-on exercises. Over
1300 pages + CD-ROM with software and
drawings for all exercises.