Working with data links

Data links are connected pieces of data in AutoCAD. As an example, if you insert a table in AutoCAD from an Excel file as a data link and then modify the Excel file, the table inside AutoCAD will update automatically.

In this section, we will learn how to import tables and Word files in our drawings using data links. In the following example, we will learn how to import a table using a data link:

  1. Open a table in Excel. I am opening the Excel table that we used in the previous examples.
  2. Now, select all the cells that contain text and press Ctrl + C to copy all the content on the clipboard. The selected cells will now have a "marching ant" kind of frame around them, as shown in Figure 7.32:

Figure 7. 32: "Marching ant" selection box in the Excel table 
  1. Now, open a blank drawing in AutoCAD and expand the paste icon from the Clipboard panel and select Paste Special from the drop-down menu, as shown in Figure 7.33:

Figure 7. 33: The Paste Special option in the Paste drop-down menu 
  1. In the Paste Special window that pops up, select the Paste Link radio button from the left panel. Now, the right panel will show two options: Microsoft Excel Worksheet and AutoCAD Entities. Select AutoCAD Entities from the panel and click OK.
  2. Now, click on a point in the drawing area to add your table.

You will notice that a table that looks exactly like the AutoCAD table will show up, but this table is a data link that is linked to the original Excel file. If the size of the table is very small or large, then zoom in or out or use the SCALE command to change the size of the table as per your requirements.

In the preceding example, if, instead of AutoCAD Entities, you selected Microsoft Excel Worksheet from the Paste Special drop-down menu, then you would have a linked table that looked more like an Excel sheet.

If you modify the original Excel sheet and save your Excel file, and then go to the AutoCAD drawing that contains the linked table, a pop-up bubble will appear mentioning a change in the data link. You can click the Update data link text in the pop-up bubble to update the data link. Alternatively, you can also right-click on the data link icon in the status bar and then select Update All Data Links... from it, as shown in Figure 7.34:

Figure 7. 34: The Update All Data Links... option in the status bar 

To add a Microsoft Word file as a data link, you can follow the same workflow. In this case, I will import a simple piece of text from Microsoft Word to AutoCAD:

  1. Open a Word file that contains text, press Ctrl + A to select all the text in the Word file, and then press Ctrl + C to copy the text to the clipboard.
  2. Now, go to the Paste Special window from the expanded Paste panel and select the Paste Link radio button, as shown in Figure 7.35:

Figure 7. 35: The Paste Link radio button in the Paste Special window
  1. Select Microsoft Word Document from the panel in the middle and click OK.
  2. Click on a point in the drawing area to paste the data link.

The linked text is now added to your drawing, and if you now modify the text in the Word file and save the Word file, the text inside AutoCAD will change automatically to reflect the changes. If, for some reason, your linked text is not changing, then once again go to the data link icon of the status bar, right-click on it, and select Update All Data Links... to update the data link.

As you may have noticed, data links are great if you primarily work with Excel tables and want to avoid the hassle of modifying or formatting tables in AutoCAD. You can make tables in Excel and import them to AutoCAD with just a couple of clicks.

Similar to data links, there is also a feature inside AutoCAD that lets you link a property to text: fields. We used formulas in our earlier table example. Fields are like formulas, but there is a lot more to this tool than just formulas. In the next section, we will explore this tool in detail.

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

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