Now you understand how lookup tables are formatted and referenced from Revit families, let’s have a look at how we can improve our workflow.
It’s clear how lookup tables are beneficial to the pipe and conduit modelling process, so how can we use them in other Revit family categories?
Originally lookup tables were only available to pipe and conduit fittings, but we can use them in any family category. We can build fully flexible families that a controlled with lookup tables, we just need to use a bit of common sense when deciding if a lookup table is best suited or not.
Valves would be suited quite well to utilising lookup tables, whereas a VAV box would be more suited to using formulas and other parameters.
Building Your Own Lookup Table
You can use dimensions, angles and integers to both look up and be looked up, the trick to working with integers is that your column header format should follow
Using integers can be valuable within lookup tables to control the dimensions of specified manufacturer equipment. To achieve this, we need to take the manufacturer sizes and populate them into a lookup table. Working this way locks down the sizes so that the end user is unable to manipulate them. In this example, we’re going to work with a basic rainwater tank.
Rainwater tanks are a perfect use of lookup tables, you could have a family file that contains data for one manufacturer, then the lookup table drives the dimensions based on the volume. We use the volume value because this will drive all other dimensions of the tank.
We’re going to use an integer parameter for our tank volume, as volume parameters can not be used in lookup tables.
This is our basic lookup table to get started with. We’re going to look up the volume as an integer which will in turn drive the tank diameter, height and inlet height dimensions.
You can see that based on our basic lookup table and our lookup formulas, the correct data is being input into the family.
Once the lookup table is populated with the tank dimensions across the product catalogue, all a user needs to do is change the tank volume to a value that corresponds with one in the lookup table and all the dimensions will automatically update.
A trick that can be used with lookup tables is that we can drive a single text parameter with a lookup table, the same old restrictions apply though, if you’re looking up an instance parameter, you must be driving an instance parameter.
The secret behind bringing text in from the lookup table is to leave the lookup column in the formula blank. In our rainwater tank example, that would read as follows
size_lookup(Lookup Table Name, “”, “NOT SPECIFIED”, TankVolume)
Getting More Advanced – Allowing Custom User Input
The example water tank is great when you want to completely lock down a family, but what if you want the option to allow input form the user? We can allow for this by adding a few additional parameters to the family.
To achieve this, we’ll add a yes/no parameter to the family which can be checked when the user wants to specify a custom size. When checked, this parameter will override the lookup table.
We then need to add parameters within the family for every parameter that is controlled by the lookup table.
The new parameters that have been created in the family are CustomDiameter, CustomHeight, CustomInletHeight and CustomTankType.
We now need to change the formulas for each parameter being controlled by the lookup table so that the lookup formula is nested within an if statement.
This also allows our trick with the text lookup to make it very clear that custom dimensions are being used, as we’re changing the TankType parameter to read “CUSTOM DIMENSIONS”
Modifying Existing Pipe Fitting Lookup Tables
Now that we know everything there is to know about lookup tables, modifying existing lookup tables should be quite easy. For this example, we’re going to use a PVC pipework bend.
You can download a copy of the files I’m working with here
Open the family
Open the family type dialogue
Click on the Manage Lookup Tables button
Export the existing lookup table
Rename the lookup table to Bend_PVC_DWV_Iplex.csv
Back in the family types dialogue, import the new Bend_PVC_DWV_Iplex.csv and chance the Lookup Table Name parameter to Bend_PVC_DWV_Iplex
Apply the changes and close the family types dialogue before continuing.
Download a copy of the Iplex DWV piping catalogue from http://www.iplex.com.au/iplex.php?page=lib&lib=8&sec=186 we will be referring to the Plan Bend F&F on page 24.
We also need to refer to the Drain, Waste & Vent Pipe table on page 23 for information about pipe diameters and wall thicknesses
Open the .csv file in Excel. The out of the box (OOTB) lookup table is in inches, it is up to you if you convert the current dimensions to millimetres or not, but we will need to change the column headers from inches to millimetres (USA spelling)
Compare the dimensions of the Iplex product catalogue with that of the Revit family.
|Iplex Catalogue||Revit Family|
|L1 – L2 (from fitting table)||Centre to Socket Bottom (CtSB)|
|L2 (from fitting table)||Socket Depth (SDpt)|
|a (from fitting table)||Angle|
|L1 (from pipe size table)||Fitting Outside Diameter (FOD)|
|L2 (from pipe size table)||Wall Thickness (WThk)|
Something to take note of is that the L1 dimension from the pipe fitting takes into account the total length of the fitting from the centre of the fitting to the end of the fitting including the socket.
Within Revit the Centre to Socket Bottom does not include the socket, so the figure that we need to take for CtSB is actually L1 – L2
In this example, I’m going to start with the 40 dia fitting size, however if you have a need for the 32dia pipe fittings you can start there.
There are 3 different 40 dia elbows in the Iplex catalogue. 40×15°, 40×45° and 40×90° each with differing dimensions. To allow for each specific fitting, we’re going to add a row for each fitting from the catalogue.
Fill out the corresponding data to the lookup table from the Iplex catalogue, once done, save the csv file and load it back into the family and test the flexing of your new 40 dia fitting.
If you’re happy with how the family flexes for your 40 dia fitting, continue adding the remaining sizes to the lookup table.
Once you’re finished you’ll have a complete, dimensionally accurate Iplex PVC pipe fitting.