11/28/2005 - 5:00 pm - 6:30 pm Room:N. Hemispheres (Salon E1) (Dolphin)

Walt Disney World Swan and Dolphin Resort Orlando, Florida

The Ins and Outs of AutoCAD®-Based Software Byron Funnell - The CADMaker

GD15-3 Are you confused by all the different types of output files you can generate with AutoCAD-based software? Do you wonder when you might want to export a TIFF, DWF, BMP, or DXF file? Do you struggle to get your output to look just right? In the solid modelers, do you use DXF, STEP, IGES or something else? In this class, you'll learn the differences among these formats. You'll also see how to prepare your CAD files for use in other documents types, such as those generated by Photoshop, Word, Publisher, and others. We'll also address the topic of when to use the Export command instead of plotting to a file type. Is there a reason you shouldn't use OLE? How best to utilize those block attributes.

About the Speaker: Byron graduated with a BSME from Purdue University, and worked as a mechanical engineer and CAD manager for several years. He began using AutoCAD in 1985 with v2.16, Mechanical Desktop since its inception as Designer and AutoSurf, and more recently Inventor. He has been a trainer and consultant of Autodesk products since 1986. In 1993, Byron opened his own CAD services company, The CADMaker, in Fort Wayne, IN, where he provides training, customization, consulting, and design work for local companies. For the past several years, Byron has also served as the president and webmaster of D.R.A.W., the LUG in northeast Indiana. [email protected]

The Ins and Outs of AutoCAD®-Based Software

Handout Topics

I arranged this handout with two examples that provide hands on experience that will show you how to merge a clean AutoCAD based image into MS Word and to create a spreadsheet from AutoCAD attribute tags; then placing that spreadsheet back into AutoCAD. At the end of the handout I have listed commands that allow input or output to/from AutoCAD based products. This can be used to take notes during the lecture or for reference later to find that “missing” import/export type. At the very end there are some links to web sites for additional information and programs that may help with the input/output tasks.

Step by Step for Great JPG output in MS Word.

Let’s look at some simple steps to create a nice looking graphic that we can scale to fit into an appropriate size space in a generic document. To make things easy, we will use Microsoft Word. If we start a new document file and look at the file>page setup/margins dialog box, we can figure out how big the desired graphic should be. Our ruler at the top of the Word document will also show this information, but not as accurately. In this case I set the left margin to 0.7” and the right margin to 0.8”

Assuming we are using letter size output, our paper is 8.5” wide. I chose to use a 1.5” total margin (.7” + .8”) allowing us to use a graphic that is 7” wide in our document. We then need to estimate the height. We may be fixed in the height to fit into some area or we may have the option of using the entire page. If we choose to use the entire page, we’d need to look at the top and bottom margins along with any header and footer dimensions. In this case, let’s assume we could fit our graphic easily in a 2” high space.

In AutoCAD, let’s start a new drawing and create a new layer called BOUNDRIES with the color red (optional) and set the layer not to plot. We could have also used the DEFPOINTS layer. (note: in releases prior to 2004 using DEFPOINTS was our only option).

We will use this layer to create a reference border that won’t plot but will fully contain our graphics. I like to draw a rectangle, but a point in the lower left and upper right will work just as well. I also like to set my limits to the size I have available in width and a suitable height. This allows the ZOOM All to fit to this new “paper” size. For this example let’s go with 7” wide and 2” high. I set the limits to 0,0 and 7,2 and created a rectangle using those same coordinates. For the example I wanted to add some geometry, so I switched back to a plotable layer (I chose one called Geometry) and added some 0.1” high Arial text (matches 10 point height in Word), a dimensioned rectangle and circle, and a simple triangle as shown. To show the limits, I turned on the grid.

2 The Ins and Outs of AutoCAD®-Based Software

Side note: There are several different standards as far as point sizes go and I was not able to determine the true conversion factors so I recommend measuring the text as it is printed and match your AutoCAD text to that. Most of the definitions that I found are really close to 1/72” = 1 point. In my tests though, this doesn’t match up. Here are a few samples I tried. I also noticed that not all fonts measured the same height for a given point size. So, ideally, if you are trying to match your document text, I still suggest measuring a printed copy and matching your AutoCAD text height to that.

10 Point ARIAL measured 0.10” 12 Point ARIAL measured 0.12” 12 Point Commercial Script BT measured 0.10” 36 Point ARIAL measured 0.36” 72 Point ARIAL measured 0.70”

3 The Ins and Outs of AutoCAD®-Based Software

To place this vector AutoCAD drawing into a Microsoft Word document, we need to generate some type of compatible file. Let’s stick with a JPEG format as most of us are familiar with that format from web use and it is one of the most common for any raster editing softwares like Photoshop in the event that we want to “doctor” things up a little. It also offers a pretty good compression routine to keep the files sizes manageable. We could also use the TIFF or PNG options here.

To get the JPEG or JPG output, we will use the plot command. Select the PublishToWebJPG.pc3 option. This will automatically check the Plot to file check box and un-gray the file name option. If you do not see that pc3 file, you may need to get it from the installation disk.

The next step is to update the Plot Style Table (pen assignments). To see this you may have to hit the > symbol in a circle in the lower right corner, expanding the Plot dialog box. I do almost all of my work with the CTB plot styles. Since many of you work in the architectural and civil engineering environments and STB is often used in those settings, I will also show how to do this with STB at the end of this section. You will want to create a new plot style to represent your raster output. You can start with one of Autodesk’s existing files or one of your own by selecting a plot style table and selecting edit or you can create a new style table by selecting New… The new button will also allow you to use old style tables saved from AutoCAD 2006 or older products back to R14. For this example, let’s choose the start from scratch option. You will then need to give the style a name. I chose JPEG to Word.ctb for the file name. Check the Use this plot style table for the current drawing box and select the Plot Style Table Editor button. This should open on the Form View tab.

4 The Ins and Outs of AutoCAD®-Based Software

From this dialog box, you set up the “plotted” color relative to the AutoCAD color. If your output is like mine, it will typically be monochrome. To quickly make changes to all 255 colors you can select Color1 then scroll down to see Color 255, hold down the shift key and select Color255. As a function of Windows this will select all of the Colors. Note that the CTRL key will allow you to selectively pick/unpick more than one option. With all 255 colors selected, change the Color to 7 (black or white depending on the background color). See the next figure. I also changed the Lineweight to 2.00 mm for all layers. If you want some to be lighter and some darker, you can control that here using colors.

We now have the most important step of all, getting the plot size. What should the paper size be to get a good fit in our document? The answer lies in the resolution desired and the size of the drawing we created (ie. the size of the opening). Our drawing if you recall is 7” x 2”. Let’s start with a resolution of 600dpi which is typical of many laser printers. That means we’d go with a plot size of 4200 by 1200 pixels. That was easy enough, but how do we change that in the paper size dialog area, because I sure don’t see those numbers in the sizes listed?

Go back up to the plotter configuration and select the properties button for the JPEG plotter. Then select the custom paper size. See the next two figures. Now select Add and choose either of the two options; start from scratch adding to the list, or use

5 The Ins and Outs of AutoCAD®-Based Software existing modifying an existing size. If you use the second option, choose a file to replace and then select Next. Now simply add the count that we are looking for. In this case it is 4200 and 1200. Make sure it says Pixels.

We now close the sets of dialog boxes by hitting next and finish getting back to the plot dialog box. We must select the best options from the plot settings tab. Here are the options that I selected. Note that the scale to fit shows us a 1:.00166 ratio. That is 600:1, our multiplier. I showed both using Fit and the 600:1 on the next page. We can now plot by Extents or Limits which are the same in our case. You must remember to select your paper size that you just created from the pull down menu! Doing a print will give you a quick look to see whether you have your settings correct or not.

6 The Ins and Outs of AutoCAD®-Based Software

Hit the OK button and enter a filename and location to create the JPEG file. Now we can insert it into MS Word using the Insert>Picture>From File… and we get the following graphic as our result.

Our plot file size is 165 Kb. Notice how we have smooth arrowheads and text and that the lines on the triangle don’t have the “jaggies”. We could go ahead and use a resolution even higher, but as you can guess, the file size keeps growing and we will be limited by the resolution of our final output device. If we go to a lower resolution, our graphics become more pixilated or jaggy. Our choices become a true game of trade-offs. This should give you a good starting point to work from in generating your own great documents.

If you are using the STB plot styles, there are a few more things to check. You may need to verify that you select the appropriate style (not normal) in the layer dialog box.

The options here will make a bit more sense when we look at the plot style dialog box in the next step. When you go to plot and select the Plot Style that you want to use you will see a little bit different set of options than with the CTB.

7 The Ins and Outs of AutoCAD®-Based Software

In fact, much of the dialog box may be grayed out. If this is the case you likely have your Plot Style set to Normal. Changing this to another option will un-gray the area to the right. You can then modify the Color and Lineweight just like before. As you can see the result is identical to the CTB output with these settings. Plotting with the Normal option will yield shaded or color output.

8 The Ins and Outs of AutoCAD®-Based Software

The following image is about a 2.1 Mb JPEG image from an STB drawing in the Map Samples directory.

Even as busy and large as this drawing is the quality is still pretty good. The line weights were changed to those established when it was created instead of the 2.00 mm lines which made objects too heavy to discern individual objects.

9 The Ins and Outs of AutoCAD®-Based Software

AutoCAD Attributes to Excel and Back

I would also like to show you another example of the Ins and Outs of AutoCAD by doing an attribute extraction, reading that into Excel, then inserting that result back into AutoCAD as an OLE’ object. Lets start by creating a new drawing and placing a circle at 0,0 with a diameter of 1.0 inch on layer 0.

Zoom to be able to see the part. Now add some attributes to be associated with the circle. We will use the _ATTDEF command. The upper right corner of the dialog box is for the information that will be asked when the block is inserted or during an edit session. The information below that determines how the attributes text will look on the drawing. The information on the left side allows greater control over the blocks attribute. In our example we will make all of the attributes invisible. After the first attribute is created we can click on the Align below… button to line up the text fields of the attributes. The image to the right of the dialog box shows the circle with four attributes.

It was then saved as hole.dwg. The next step is to close this drawing so that we can use it as a block.

Start a new drawing from scratch and create a rectangle. I am going to lay one out as a 12” square with the lower left corner at the origin (0,0). Now insert the block called hole. For our first insertion I am going to place the block at 1,1 with a scale of .25. I am going to fill in the information as it is requested as: Type A Depth THROUGH Purpose MOUNTING Thread NO THREAD

I am going to array this as a 10” square pattern.

10 The Ins and Outs of AutoCAD®-Based Software

I am going to insert another hole block at a scale of .19 at random locations representing holes to mount parts to the plate. Type B Depth THROUGH Purpose MOUNTING Thread 10-32 UNC I will add one final hole as a 1.00 hole representing a clearance pocket for something in the center of the plate and ½” deep. Type C Depth .50 Purpose CLEARANCE Thread NO THREAD We now have three types of holes on our plate that we would like to create a hole chart for. Let’s export the attributes to an Excel file. The easiest way to do this is to use the EATTEXT command available in 2000+ products. It saves a lot of the tougher work over using the ATTEXT command. You no longer need to have a template file in most circumstances. We could also go directly to the new AutoCAD tables feature too, but part of our example here is to show how to get an Excel spreadsheet into an AutoCAD drawing. The EATTEXT command brings a series of dialog boxes prompting you for answers to options. On Page 1 of 6, select the Create tables or external files from scratch radio button and select Next. On Page 2 of 6, we will be selecting the Current Drawing option and selecting Next. Note that we could add additional drawings at this point to our Attribute retrieval. On Page 3 of 6, we need to check the Exclude blocks without attributes box and the Exclude general block properties box. This is very important if we want access to additional properties. When we make these selections it opens up the additional properties. I made the following selections and once again selected Next.

This takes us to Page 4 of 6. In this selection I unchecked the AutoCAD table and selected the External File box. I gave the file a name and path that I could locate and selected next. To make things easiest here, select the .xls file type. It defaults to .cvs which can be opened in Excel, but the standard .xls is the default in Excel. This takes us to Page 6 of 6 (it skips Page 5) which we can select Finish.

11 The Ins and Outs of AutoCAD®-Based Software

When we open our file in Excel we get the tabular data below.

Formatting the data we can end up with this nice looking table. You will need to change many of the cell’s types from text to numbers as all of the data comes in as straight text. You can see I deleted some unwanted data, sized the rows and columns, added categories and sorted by type, x and y.

12 The Ins and Outs of AutoCAD®-Based Software

This file can now be inserted into our original AutoCAD drawing using the pull down Insert/OLE Object and selecting our file.

13 The Ins and Outs of AutoCAD®-Based Software

After placing the spreadsheet into the AutoCAD drawing, I added a rectangle around the drawing just like we did in the JPG to Word sample but scaled to 133 1/3 to 1. The rectangle was 31.5 x 13 and again using a resolution of 600 the pixel size was 4200 x 1750. As you can see once again we got nice results.

Thus, we have made an entire round trip with our data from AutoCAD to Text to Excel and back to AutoCAD showing how to do some basic AutoCAD attribute extractions and inserting OLE’ objects.

Ins and Outs options within Autodesk Softwares I am providing this listing as a reference only. There are over 100 options listed here. Sometimes finding that that you are looking for can be daunting. Input Options File>Open>Drawing (*.dwg) File>Open>Standards (*.dws) File>Open>DXF (*.dxf) DXFIN File>Open>Template (*.dwt) Insert>3D Studio... Insert>ACIS File... Insert>Drawing Exchange Binary… (DXBIN) Insert>Windows Metafile... Insert>OLE Object Insert>Raster Image…>BMP (*.bmp, *.rle, *.dib) Insert>Raster Image…>CALS1 (*.rst, *.gp4, *.mil, *.cal, *.cg4) Insert>Raster Image…>FLIC (*.flc, *.fli) Insert>Raster Image…>GEOSPOT (*.bil) Insert>Raster Image…>GIF (*.) Insert>Raster Image…>IG4 (*.ig4) Insert>Raster Image…>IGS (*.igs) Insert>Raster Image…>JFIF (*.jpg) Insert>Raster Image…>PCX (*.) Insert>Raster Image…>PICT (*.pct) Insert>Raster Image…>PNG (*.png) Insert>Raster Image…>RLC (*.rlc) Insert>Raster Image…>TGA (*.tga) Insert>Raster Image…>TIFF (*.tif, *.) View>Render>”File”>BMP View>Render>”File”>PCX View>Render>”File”>Postscript View>Render>”File”>TGA View>Render>”File”>TIFF Draw>Text>Multiline Text…>Options>Import Text limited to 32Mb *.rtf or *.txt Edit>Paste

14 The Ins and Outs of AutoCAD®-Based Software

Output Options File>Saveas> or File>Saveas File>Save>AutoCAD 2004 Drawing (*.dwg) File>Save>AutoCAD 2000/LT2000 Drawing (*.dwg File>Save>AutoCAD Drawing Standards (*.dws) File>Save>AutoCAD Drawing Template (*.dwt) File>Save>AutoCAD 2004 DXF (*.dxf) DXFOUT File>Save>AutoCAD 2000/LT2000 DXF (*.dxf) File>Save>AutoCAD R12/LT2 DXF (*.dxf) File>eTransmit> File>Publish to Web> File>Export>Metafile (*.wmf) WMFOUT File>Export>ACIS (*.sat) ACISOUT File>Export>Lithography (*stl) STLOUT File>Export>Encapsulated PS (*.eps) File>Export>DXX Extract (*.dxx) ATTEXT File>Export>Bitmap (*.bmp) BMPOUT File>Export>3D Studio (*.3ds) 3DSOUT File>Export>Block (*.dwg) WBLOCK File>Plot>Autodesk ePlot>DWF Classic (R14 look) File>Plot>Autodesk ePlot>DWF ePlot (optimized for plotting) File>Plot>Autodesk ePlot>DWF ePlot (WHIP! 3.1 Compatible version) File>Plot>Autodesk ePlot>DWF eView (optimized for viewing) File>Plot>Autodesk ePlot>DWF ePlot File>Plot>Adobe PostScript (three types) File>Plot>DXB file format (often used to flatten 3D object and reinsert them into AutoCAD) File>Plot>Raster file formats>CALS MIL-R-28002A Type 1 (CCITT G4 2D Compression) File>Plot>Raster file formats>Dimensional CALS Type 1 (CCITT G4 2D Compression) File>Plot>Raster file formats>Independent JPEG Group JFIF (JPEG Compression) File>Plot>Raster file formats>MS-Windows BMP (Uncompressed DIB) File>Plot>Raster file formats>Portable Network Graphics PNG (LZH Compression) File>Plot>Raster file formats>TIFF Version 6 (CCITT G4 2D Compression) File>Plot>Raster file formats>TIFF Version 6 (Uncompressed) File>Plot>Raster file formats>TrueVision TGA Version 2 (Uncompressed) File>Plot>Raster file formats>ZSoft PC Paintbrush PCX (ZSOFT PACKBITS Compression) File>Publish> File>Send Function of Windows. Part of Windows compliance. Edit>Copy Edit>Copy with Base Poin Edit>Cut Tools>Attribute Extraction Battrans in Inventor Series. External Batch Translator for STEP and IGES. Here are a few extra “Ins and Outs” found in some of the vertical products. Insert>LandXML... ADT Insert>IDF… Printed Circuit Board data MDT File>Export>Export Data… MDT File>Export>Desktop ACIS MDT File>Export>Desktip VRML MDT File>Export>IGES IGESOUT MDT File>Export>STEP MDT File>Open>Pro/ENGINEER files (*.prt, *.asm) Inventor File>Saveas>Part Files (*.ipt) Inventor File>Saveas>BMP (*.bmp) Inventor File>Saveas>DWF Files (*.dwf) Inventor File>Saveas>IGES Files (*.igs, *.ige, *.) Inventor File>Saveas>SAT Files (*.sat) Inventor File>Saveas>STEP Files (*.stp, *.ste, *.step) Inventor File>Saveas>STL Files (*.stl) Inventor File>Saveas>XGL Files (*.xgl) Inventor File>Saveas>ZGL Files (*.zgl) Inventor File>Export>AVI... Revit File>Export>ODBC Database... Data Source Named database Revit File>Export>gbLML... Revit File>Export>Image...>BMP Revit File>Export>Image...>JPEG(lossless) Revit File>Export>Image...>JPEG(medium) Revit

15 The Ins and Outs of AutoCAD®-Based Software

File>Export>Image...>JPEG(smallest) Revit File>Export>Image...>TARGA Revit File>Export>Image...>TIFF Revit File>Export>DWF>2D DWF Revit File>Export>DWF>3D DWF Revit File>Export>DWG, DXF, DGN, SAT...>AutoCAD 2004 DWG Files (*.dwg) Revit File>Export>DWG, DXF, DGN, SAT...>AutoCAD 2000 DWG Files (*.dwg) Revit File>Export>DWG, DXF, DGN, SAT...>AutoCAD 2004 DXF Files (*.dxf) Revit File>Export>DWG, DXF, DGN, SAT...>AutoCAD 2000 DXF Files (*.dxf) Revit File>Export>DWG, DXF, DGN, SAT...>Microstation DGN Files (*.dgn) Revit File>Export>DWG, DXF, DGN, SAT...>ACIS SAT Files (*.sat) Revit File>Export to AutoCAD>2004 Format…> ADT File>Export to AutoCAD>2000 Format…> ADT File>Export to AutoCAD>2004 DXF Format…> ADT File>Export to AutoCAD>2000 DXF Format…> ADT File>Export Property Data… ADT File>Publish to Mapguide... ADT File>Publish to 3D DWF... Req DWF Viewer 5.0 or higher to read the 3D data ADT File>Link to Autodesk VIZ Render... ADT

Links to outside help in getting your data moved around. http://www.autodesk.com/ free viewer and writer Follow the link to the download areas for the DWF Viewer, DWG TrueView, Inventor View, and the DWF Composer There are also some great instructional sheets and comparison data on their products and relative to that can be linked to from the download pages. http://www.transmagic.com/ translation software http://www.delcam.com/ translation software http://www.aspire3d.com/flexichanger/ translation service http://www.cadzation.com/ Acroplot - PDF/DWF batch writer http://www.bluebeam.com/ Bluebeam –converts to PDF, DWF, TIF, JPG, BMP, PNG, PSD, and PXL http://www.daneprairie.com/ WIN2PDF - PDF printer http://www.adobe.com/products/acrobat/main.html Acrobat- PDF software http://www.jasc.com Paint Shop Pro raster editing software $55 http://www.graphicsmagick.org Free raster program

16