Back

AutoCAD Fields Forever

Let’s face the facts. How many times in project meetings are we told to be more efficient, lower our cost per sheet and be more productive on projects? In the fast paced, ever-changing world of CAD and design we need to use the tools available to assist us on becoming more effective yet maintaining accuracy on our designs.

Fields were first introduced in AutoCAD® in 2005 mainly to populate data or pull information that can be translated onto other sheets. What about all of those other functions fields can do? What if you could calculate the impacted area of a site and have the number displayed on screen and change as you work through the design? What about adding fields to your templates so when the project name changes it moves on all designs?

These are just two examples we will cover on the subject of fields. A vast open horizon of possibilities to help us improve is at our fingertips. Let’s review some of the most common uses and some hints and tips on how you can eliminate a little bit of stress in your daily life of CAD and design.

What Is a Field?

A field is a text string in AutoCAD that contains instructions to display data that you expect to change during the design process or lifecycle of a drawing and/or drawing package. A greyed out area in a drawing indicates that a field has been used and the data is linked to another source.

Using Drawing Properties

First we will explore how to use the drawing properties button to populate data in the title block. Move to the application browser and select Drawing Properties as shown in Figure 1.

Figure 1: Drawing Properties

After selecting drawing properties you will bring up the drawing properties dialog box where you can enter custom data for your project. For this example we will enter the Title, Subject, and Author of the current project as shown in Figure 2.  Note: You can also add data to the custom tab which can include additional project information such as project number or submittal date.

Figure 2: Enter project data

Now that you have entered your project data, move to your titleblock where you can have attributed text or a regular text object. For this example we are just going to use a small portion of a title block as shown in Figure 3a below. Notice the greyed out areas are already filled in with the information I provided in the drawing properties as shown in Figure 2 above.

Figure 3a: Example title block area

To populate the project title move to your template and highlight your text object (My Project) then right-click insert field… from the pull-out menu. You will then select the field category for your selection as shown in Figure 3b. Notice when you select Title, the project title “My Project” is located in the title field.

Figure 3b: Drawing title field

Do the same for the drawing name and the author.  Now you have your fields set up in your template and if you use that template throughout your project you can update these by using drawing properties. This is a small example of how to use drawing properties to fill out information using fields. The real power behind templates and fields can be found by using the SSM (Sheet Set Manager). When you  scroll through field categories take a look at how may options you have to populate data using the SSM.

Label an Area and Define Acres 

We are now going to locate or create a closed object or polyline in a drawing and place a leader with mtext on an object and use a field to label the area (in acres) of the object.  Let’s first draw an irregular shape on our drawing. Next type the mleader command and place a leader pointing to the object as shown in Figure 4.

Figure 4: Area of a pond

For now, we will place two XXs in the position where we will add the field. Right-click and hightlight the XX as shown in Figure 4 and select insert field. Hit the object button as shown in Figure 5 then select the outer bold line (boundary), select area, then decimal. But wait, we want acres and this is in standard  units 1-1, which would be square feet.  We are assuming that the coordinate system is set up to decimal units or 1-1. Therefore, the value displayed in the field will be in square feet and  not acres. We just need to add a format to the field. Select the Additional Format button shown in Figure 5.  Note: You do not have to add text, you can just right-click in the open mtext editor and  insert a field.

Figure 5: Select the Object 

After selecting that object, choose Area as shown in Figure 6a.  Notice how you can also choose the format and the current precision of your output. You have now retrieved the area in square feet, but we need to convert to acres. Hit additional format as shown in Figure 6a.

Figure 6a: Additional Format in fields

Figure 6b: Conversion factors and text

Figure 6b has two steps. In Step 1 you are going to divide the value by 43,560, which is how many square feet are in an acre. In Step 2 you will add a Suffix, in this case we are adding the word ACRES as shown in Figure 6b, Step 2. You now have a field that will update the area of your pond in acres each time you change that boundary of that object.  Tip: For those of you curious how I placed the image within an irregular shape, try the Express Tool SuperHatch. With Superhatch you can place images, blocks, and create your own hatch patterns to be used within your drawing file.

Figure 7: Final area calculation

Point Coordinates in a Table

Take a standard  block you use in a drawing such as a point with an ID. We are going to place point blocks anywhere in our drawing file. Our block will be a simple block with one attribute for the point name (i.e., PT-01). The attribute field will be named POINT_NUMBER. Using the same technique as we have for the getting the area we are going to extract data to a table. Start the table command in AutoCAD and create a table named Points List. On the table have four columns: Point Number, Northing, Easting, and Elevation. Create four rows for the table as shown in Figure 8.  Keep in mind you can extract all types of data, but adding a new row and colum  will be easy. Using the the same technique as shown in Figure 5, we will add the data by using the field-object selection. 

Figure 8: Point list table

Move to the row and column in the table under point number and hightlight the text object X and right-click to insert field.  Note: We added the Xs in there to get the formatting of the text within the table. Select Object then Point_Number as shown in Figure 9. This field represents the attribute name for the Point Number (i.e., PT-01).  You point number will now appear in the table in the first column on the table.

Figure 9: Point Number Attribute Data

Figure 10: Point list table

Moving across the table do the  same for the Northing, Easting, and Elevation. Select Position under the Property section of the field. Notice under the preview as shown you get an X,Y, and Z value of the point.  Uncheck the X and Z to pull just the Y coordinate for the field. That completes the data for the first point on your table. If you move PT-01, the coordinates will change in the table. If you change the point name in the block attribute, that will change as well. This is an effective way to use points and data within a drawing file. Final point list for PT-01 is shown in Figure 11.

Figure 11: Point list table

HINT: When project is complete, right-click the table and export the data to an Excel file. You will make your team member happy!

Linking a Scale Bar to a Viewport

How many times have you opened a drawing file and looked at the scale and it was not the same as the viewport?  Let’s take fields one step further and link to a viewport, adding a formula to modify the scale bar. We are going to open up our drawing and create a viewport and set the viewport scale to 1=10 in decimal units and a custom scale name of 1”=10’.  Within our drawing we also have a typical scale bar as shown in Figure 12. This scale bar can be a block with attribute values or just an object within AutoCAD.

Figure 12: Standard scale bar

Start by moving to the text area after the SCALE: designation as shown in Figure 12. Right-click and, using the same method as before, select the object then the viewport.  After the viewport has been selected move down to custom scale, then select use scale name as shown in Figure 13.

Figure 13: Custom scale name

We now have the correct scale name shown below the bar, change the viewport scale, and watch this change.  Keep in mind the name you give the scale is what will appear in the field.  Next we have to make sure the numbers correspond with the scale we have selected. Right-click the first number (10) on the scale bar and hit Insert Field—again, using the same technique as before but adding a few new steps as shown in Figure 14. In step 4 we will hightlight the text in the field expression—right-click and copy. Under the field category section move to the formula selection under field names.

Figure 14: Custom scale fields

As shown in Figure 15, select Formula then in the window shown in step 2 paste the formula that you copied from the previous section.  One thing we need to do here is in front of the greyed out section type 1/. You need to add this part to the formula in order for AutoCAD to calculate the scale.  Remember we are using the value #:1 which means we will have to divide that by one to retrieve the whole number. Finally, in  Step 3 change the precision back to 0 for a clean scale.

Figure 15: Custom scale name 

To get the last part of the scale bar, simply copy your field (number 10) over to the section where you want the number doubled (in this example 20). Add the multiply by 2 after your formula as shown in Figure 16 and your value will be double what the first selection was; in this example, 20.

Figure 16: Multiply value of second text string

With a little manipulation you can use architectural, scientific, and engineering units to receive the same results. Look at the number and perform the necessary calculations to get accurate results.

Your final scale bar will have fields as shown in Figure 18. This scale bar can be used in a template where it is linked to the viewport within the template file. If you plan to use it on a current drawing you will need to follow the steps selecting the viewport and changing the formula for that object.

Figure 17: Final Scale Bar with Fields

Conclusion

Take a look at the photo of the field at the beginning of this article.  Look closely and think of all the possibilities that can be done with a field. You can play a baseball game, plant trees, or even build a house. The possibilities are endless.

To me, AutoCAD fields are just like looking at that photo. Think about all the data that can be extracted from a drawing file, and then how it changes during the design process.  Can using a field help you become more accurate and efficient by pulling data and having it change dynamically? You will be surprised how effective this tool can be. 

Appears in these Categories

Back