# AutoCAD Civil 3D and Pay Items, Part 2

20 Jan, 2011 By: Phillip Zimmerman### CAD Clinic Civil 3D Tutorial: Learn the ins and outs of the formula file, the last of the three files that create a master pay items list.

*Editor's Note: This tutorial courtesy of Imaginit.*

In my previous article, I reviewed the pay item definition process and the files necessary to implement a master pay item list. In this month's continuation, I will review the formula file and its purpose.

The formula file's use depends on the units set for a pay item. For example, a corridor's Pave1 area is in square feet, but in the pay item file the units are square yards. A pay item report for Pave1 will be in the pay item area units, not the corridor's square feet. If Pave1's assigned pay item unit type is a weight unit type, the pay item report is Pave1's actual area — or, in this case, Pave1's square feet. In either case, you need a formula to calculate a volume.**Pay Item Units**

When creating a corridor, the pavement unit type is square feet. As mentioned above, if a pavement material's pay item's unit is square yards, the report will be in square yards. When producing a pay item report, the report's pavement units are in the pay item's units, not the corridor's actual area units. If Pave1's pay item unit is a weight type, the pay item report will be the corridor's actual units, or square feet.

It is very important to be aware of a pay item's unit type, because the unit type affects what value a report produces. In some cases the report's values reflect a conversion of the item's actual units. If the actual and the report unit types are areas, the pay item report contains an amount in pay item units. If the actual units are area and the pay item units are weight, the pay item report contains the actual units. Therefore, if Pave1 pay item's unit is square yards, the pay item report contains Pave1's area as square yards. Or, if Pave1 pay item's unit is ton, the pay item report contains Pave1's square footage. A pay item's unit type determines what values you need to have in a formula to calculate the correct amount. **The Formula File**

The formula file is the last of three files that create a master pay items list. This file is optional and does not need to be implemented to use pay item entries. What, then, is the purpose of the formula file? When working with pipes or structures, the interest is in the count or length values. The pay items reports calculate these unit values without a formula.

When working with other materials — for example, roadway materials — the materials need estimated volume or weight values. In a drawing, these materials or pay items are represented by areas and their initial values may come from a corridor and are in square feet or yards, never weights. The formula file converts the area values to weight and/or volume values.

In a code set style, the assignment of a pay item to a link defines only the width of the material in the assembly. In any assembly, the link's width is the sum of its right and/or left sides. The pay item report uses the pay item's units, not the corridor's square feet values, to produce a report value. For example, if Pave2 is a binder and its pay item unit area is square yards, the Pave2 pay item report will be in square yards even though the corridor area of Pave2 is square feet. If Pave2 pay item's unit is tons, the pay item report contains Pave2's square foot area.

It is necessary to create a formula that calculates the tonnage from Pave2's area unit value. If the pay item unit is square yards, a formula would multiply the area by the material depth to calculate the cubic yards. The depth of material is in yards; 2 inches of binder is 2/36 inches, or 0.05555555 of a yard. The pay item unit value is enclosed in braces, and parentheses encapsulate the order of calculations.

The resulting formula segment would be: ({Item Area} * 0.0555555)

The second formula segment calculates the number of pounds in a cubic yard; e.g., 3,000 pounds per cubic yard. This formula segment would be: * 3000.00. The last formula segment calculates the number of tons of material — the number of pounds divided by a ton. Again, parentheses encapsulate the order of calculations; pounds per cubic yard, then the number of tons.

The resulting formula would be: (({Item Area} * 0.055555550) * 3000.00) / 2000

For the area of 5,000 square yards, the cubic yards would be 277.775. The weight of this volume is 833325 pounds. The tonnage value would be 416.6625. The pay item report will list 416.6625 as the tonnage for the material.

If the pay item units are ton, the quantity value for a code set link is its square footage. You will then have to create a formula that converts square feet to the number of cubic yards, then the weight per cubic yard, and finally the tonnage.

A material's area represents the corridor's turns and vertical changes. For example, a roadway 1,000 units long and 10 units wide does not necessarily have an area of 10,000 square feet. If the roadway has horizontal turns and vertical elevation changes, the resulting area takes these changes into account.

You do not want to include the cost of the material in the formula, because Autodesk wants you to put this value in your spreadsheet. Autodesk is only in the business of providing quantities, not estimating the cost.

Create a Pay Item Formula

After developing the formula that creates the correct quantity, how do you enter the formula? Before entering a formula, you need to create or load a formula file. The formula file can be an existing file or one you create on the fly by double-clicking on a master pay item entry's formula cell.

**When you want to create a formula for a loaded formula file, click in the pay item's formula cell. When you do so, a pay item formula dialog box with the pay item's category number will appear. **

To identify the pay item units, on the dialog box's right side, click the left of the two buttons. When clicking the left button, a drop-down list appears that contains the unit types: area, count, length, and part depth. After selecting the unit type, an entry appears in the expression area with the unit type in braces. Finally, you'll enter the remainder of the formula.

You have to repeat this process for each item that needs its units converted before it's used in your cost estimation spreadsheet. You can use the clipboard's cut and paste functions to transfer formula segments between formulas.

This time, we looked at creating a formula file for your master pay item list. The function of the formula file is to calculate the correct units for the pay item's estimate. The resulting value is a part of the pay item report, and the value is used by your cost estimation spreadsheet. In my next article, I will discuss how to assign pay items to AutoCAD and Civil 3D objects.