Professional Documents
Culture Documents
Handout 1294 MP1294 20 - 20making 20full 20use 20of 20the 20power 20of 20lookup 20tables 20 - 20final
Handout 1294 MP1294 20 - 20making 20full 20use 20of 20the 20power 20of 20lookup 20tables 20 - 20final
MP1294 This class shows users how Autodesk® Revit® MEP building design software uses lookup tables to
automatically size pipe, conduit, and cable tray fittings properly. We look at how lookup tables are formatted and how
the Revit family references the lookup table. Users will better understand the role of lookup tables in Revit and be able
to use lookup tables when creating and editing families.
Learning Objectives
At the end of this class, you will be able to:
Identify and describe the concepts behind lookup tables and explain how lookup tables benefit the design
process
Create custom families that reference lookup tables for automated design
Use formulas with lookup tables for accurate design
Explain how using lookup tables improves workflow
Lookup tables are .csv (comma separated value) files that are used in conjunction with Revit. Revit uses
special parameters and formulas in families to reference the lookup table information. Lookup tables let
you specify multiple parameter values relative to another value without creating a separate type for
each set of values. The most common use of lookup tables is defining the various dimensions of pipe
and conduit fittings based on the Nominal Diameter of the fitting. This relationship of the .csv file and
the parameters/formulas in the family lets Revit immediately size and resize fittings based on the
segments to which they are connected.
Note the ## between each part of the column header.
2
Making Full Use of the Power of Lookup Tables
The first column is a reference column used to designate a “name” or reference for what that row in the
table defines. The column header for this column is always left blank. The second column defines the
lookup value, typically the nominal diameter of the element. This column is a comparative column that
Revit tries to match data from the family to the data in this column. All remaining columns are lookup
columns, where Revit will retrieve values based on the lookup value data in the family. If more than one
lookup value is necessary, then as many columns as needed are created, shifting the lookup columns
over. So, if you’re creating a tee fitting that has three different nominal diameters, one for each
connection, you should have three lookup value columns to coincide these parameters.
Reference Column, Lookup Value, and Lookup Columns in a Lookup Table.
Note: The lookup value(s) in the lookup table must correlate to a Size type parameter (i.e. Duct Size,
Pipe Size, etc.). lookup columns can be any type that is numerical (i.e. Length, Integer, Volume, etc.).
3
Making Full Use of the Power of Lookup Tables
In the Manage Lookup Tables dialog, click on the Import… button. Browse to the appropriate lookup
table file and click OK.
Back in the Family Types dialog, we add a text parameter named Lookup Table Name. (The text
parameter can technically be named anything you want, but to keep consistency with out of the box
families and to simplify formulas, I recommend keeping the standard name.) Then enter the name of the
.csv file in the value of this parameter.
Note: The Lookup Table Name value must match the .csv file name exactly without the .csv extension,
but it is not case‐sensitive.
Once the Lookup Table Name parameter has been filled in with the appropriate .csv file name, the
lookup table can be used in formulas to reference the table for values.
size_lookup (Lookup Table Name, “Lookup Column”, Default If Not Found, Lookup Value)
To translate this into English, we are telling Revit to go look in (Lookup Table Name) for a column called
(lookup column) and return the value from that column that corresponds with (lookup value) row. If
there is no match, return the value specified for (Default If Not Found).
Let’s look at an example:
In this case, the formula for finding the value of Fitting Outside Diameter reads something like this: In
Lookup Table Name (refers to parameter under Text where you entered the .csv file name), look for a
row in the lookup value column that corresponds to the family’s current value of Nominal Diameter and
return the value from column “FOD” in that row. If no match is found for Nominal Diameter in the
lookup value column, return a value equal to Nominal Diameter 1 + 1/8”.
Notice that Nominal Diameter currently has a value of 1”. If we look at our .csv file, we’ll see that ND,
our lookup value, corresponds to Nominal Diameter in the Family Types dialog. When ND is 1”, FOD is
1.125”, or 1 1/8”. So our family will have a Fitting Outside Diameter value of 1 1/8”.
5
Making Full Use of the Power of Lookup Tables
In this case, the formula for finding the value of Socket Bottom to Socket Bottom Run reads something
like this: In Lookup Table Name (refers to parameter under Text where you entered the .csv file name),
look for a match between Revit’s Nominal Diameter 1 and Nominal Diameter 2 parameter values and
the lookup value columns in a single row within the lookup table. If a match is found Revit will return the
value found in that row for the column “SBtSBR”. If no match is found, Revit will return a value equal to
.03*Nominal Diameter 1 + 1.96*Nominal Diameter 2 + 125/256”.
Notice that Nominal Diameter 1 currently has a value of 2” and Nominal Diameter 2 has a value of 1
1/4”. If we look at our .csv file, we’ll see our first lookup value, called ND1, corresponds to Nominal
Diameter 1 in the Family Types dialog and our second lookup value, called ND2, corresponds to Nominal
Diameter 2. When ND1 is 2” and ND2 is 1.25", SBtSBR is 3.0625, or 3 1/16".
We can define as many parameters as necessary using the lookup table, but remember that the values
are driven by the first column(s). The number of lookup values in the formula should always be equal to
the number of lookup value columns in the .csv file. If a parameter is unrelated to the lookup value
(typically the nominal diameter), it shouldn’t be part of the lookup table.
Here’s another look at interpreting this complex relationship:
6
Making Full Use of the Power of Lookup Tables
It’s important to understand what Revit is actually comparing is the parameter name used in the
formula (Nominal Diameter 2), and the corresponding column in the lookup table. So if your formula
reads (..., Default If Not Found, LookupValue1, LookupValue2) Revit will look at columns B and C,
respectively in the .csv file. If your formula is only referencing a single lookup value, Revit will never look
past the first lookup value column in the lookup table. If you’re using (..., Default If Not Found,
LookupValue1) or ..., Default If Not Found, LookupValue2) Revit will always compare the parameter in
the formula to ONLY column B in the .csv file. The parameter name in the lookup value column(s) is in
no way used by Revit.
Lookup tables may have originally been intended to be used only with Pipe Fittings and Conduit Fittings,
but we can actually use them with any category we want! By using the process that we have discussed
for creating lookup tables and associating them with Revit families, any family that can be flexed in Revit
can be controlled by lookup tables. Some are a little more logical than others. For instance, you could
add lookup tables to pipe valve families so they are sized to fit the segment they are placed in. However,
when creating a VAV box family, it typically makes more sense to drive the parameters through formulas
and other parameters since you don’t want the duct size to dictate the VAV connector sizes. So how can
lookup tables help your workflow? Maybe in Pipe Accessories, or Duct Accessories, or why not even
7
Making Full Use of the Power of Lookup Tables
Mechanical Equipment. Get creative! If you decide that lookup tables aren’t right for the situation you
can always convert the .csv file to a type catalog (Did I mention that lookup tables work with families
that have type catalogs too?).
In this example we want to use a lookup table to size a piece of equipment based on the manufacturer’s
specifications. To accomplish this, we will take all of the pre‐determined sizes that were populated into
the types of this family and convert them into a lookup table. Doing this “locks down” these sizes so that
the user will be unable to manipulate them in the project environment.
The lookup value for this family will be the capacity of the tank. We will use this value because all of the
other size parameters directly relate to this field. However, this is where we hit a snag. The Capacity
parameter is not a Size parameter… it is an Integer! According what we said earlier, we are unable to use
parameters that are not of the Size type as our lookup value.
This is where we trick the system. We can create a new parameter that is of a Size type in order to
convert this value to something we can use in a lookup table. In this case, we make a parameter called
Capacity Converter that is of the Duct Size type.
8
Making Full Use of the Power of Lookup Tables
Then, back in the Family Types dialog, you can enter a simple formula to convert the Integer value to a
Size value (in inches).
Once this conversion is done we can use this parameter as the lookup value in our lookup table. The
resulting lookup table would look something like this, where our lookup value “CC” relates to our
Capacity Converter parameter in Revit. All of the remaining columns in the lookup table will be lookup
columns.
9
Making Full Use of the Power of Lookup Tables
These lookup columns can then be used in Revit via the lookup table formula we covered earlier. For
example, you can make the “H” lookup column relate to the “Height” parameter in Revit.
Then, you can continue this process for the remaining parameters in your family. Once all of the
parameters contain the appropriate lookup table formula, all that a user has to do is change the value in
the Capacity parameter to one of the appropriate capacity values shown in the table, and all of the
dimensions will automatically update.
First, we will create a Yes/No parameter for the user to specify if they want a custom size. When
checked, this parameter will completely override the lookup table.
Then, we will add additional parameters to our family for every parameter that is being controlled by
the lookup table. For example, the Height_Custom parameter relates to the Height parameter that is
being driven by the lookup table. The custom parameters are sorted under the grouping of Construction
rather than Dimensions to group the custom parameters together rather than being mixed in with the
lookup table driven parameters.
10
Making Full Use of the Power of Lookup Tables
Now, we need to make a change to the formula for each of the parameters being controlled by the
lookup table. We will do this so that when the user checks the Custom check mark, the custom values
control the geometry rather than the lookup table values. In the example of the Height parameter, the
formula will look something like this:
Note: In this example, the Default if Not Found value for the lookup table formula also tells Revit to
use the custom values.
To translate this into English, if the Custom parameter is checked, use the value from the custom
parameter, otherwise use the size_lookup formula.
Continue modifying the formulas for the remaining parameters. You should now have a family that
allows for custom input or for input based on the lookup table.
11
Making Full Use of the Power of Lookup Tables
1. Open the family Transition –AU.rfa.
2. Open the Family Types dialog.
3. Click on the Manage button under Lookup Tables.
4. Click the Import… button and select Pipe Fitting – AU.csv from the location it is saved.
5. Create a Family Type parameter called Lookup Table Name. Define it as a Common Text
parameter and group it under Other.
6. For the Lookup Table Name parameter value, enter Pipe Fitting ‐ AU.
Now that the lookup table has been imported and associated, we can reference the lookup table to
provide parameter values. At this point you might want to open the .csv file as a reference for the
formulas.
7. In the Formula column for Fitting OD 1, enter the following:
size_lookup(Lookup Table Name, "FOD", Nominal Diameter 1, Nominal Diameter 1)
How did we arrive at this formula? Using the format from the first part of the handout and Pipe Fitting ‐
CSRW.csv. “FOD” is the name of the column of values we would like to populate the Fitting OD 1
12
Making Full Use of the Power of Lookup Tables
parameter. The first Nominal Diameter 1 is what we want to use as a value if Revit can’t find one in the
.csv file. The last value, the second Nominal Diameter 1 is the lookup value. This means that Revit looks
at the first column after Reference Column (ND) and compares it to the value in the family for Nominal
Diameter 1. If this value corresponds to a value in any row, Revit will populate the Fitting OD 1
parameter with the value of FOD from the same row.
8. Repeat the process for the Fitting OD 2 parameter, using the FOD column again.
9. Save and close the family.
10. Open a Revit project and load the new family.
11. Verify that the family is utilizing the values from the lookup table in the project.
12. Congratulations! You have now successfully created a family using a lookup table.
13