No announcement yet.

My Lookup Table is not Working Properly?

  • Filter
  • Time
  • Show
Clear All
new posts

    My Lookup Table is not Working Properly?

    I made a gate valve and I am trying to use a lookup table to allow for auto-sizing with the manufactures dimensions. I've spent a couple days now trying to figure out where I went wrong in my lookup table because for some reason Revit is not using the proper reference values. From what I understand in the lookup table formula:

    size_lookup("LookupTableName", "Column", DefaultValue, ReferenceValue)

    The ReferenceValue is used to find the Row for which that ReferenceValue resides and Revit looks for that ReferenceValue in the First Column of the CSV File.

    My formula I am trying to use is:

    size_lookup("Gate Valve", "_A", 95 mm, 1)

    In my Lookup Table, the Value in the Row where the ReferenceValue = 1 and Column = _A should be 83 mm, but Revit always defaults to 95 mm.

    On a side Note I am also confused as to why the ReferenceValue has to be a unit of measurement. I see some people use text such as "30x30", Yet when I try to type Text for the ReferenceValue, Revit says "No you cant do that."
    Attached Files

    I forgot to mention this is in Revit 2016


      I took a look at your family and I think I figured it out.

      In your CSV file, the headers list the tiles "_A##...", "_B##...", "_C##...", etc. But your lookup table formula refers to "A", "B", "C" etc. I removed the underscores from the titles in your CSV.

      Your CSV is also missing a "look up value" column, which is supposed to be after the reference column and before the lookup columns. I added a column with the title "Size##Length##Millimeters" and the following metric pipe sizes below it: 25.4, 32, 40, 50, 65, 80, 100.

      After I loaded that new CSV file into your family it worked, although I did see some constraint issues pop up at the larger sizes.

      This is the page I used when I was learning how to get lookup tables to work:

      "A specific formula is used to reference the lookup table to acquire 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).  

      Last edited by Necro99; December 15, 2017, 04:03 PM.


        Haha thanks for the reply. I actually manage to figure it out since I posted the question. The underscore must of been me messing around with the tables but It turns out that I was missing a look up value, like you said. I had thought the reference column was used as the lookup value.


          Posting here because I can't find a button to start a new post.
          I've had problems creating and adding a new .csv. When trying to import the new .csv, I get errors about the headers being wrong, although I've used the same methods as for a successfully-working .csv. I've examined the offending file in Notebook and can't see any differences. I've found that by copying the working .csv, then changing its name and editing the new version, the problems go away.


            Originally posted by Rex Wave View Post
            Posting here because I can't find a button to start a new post..
            If you see this path on the upper portion of this page and you click on "MEP - Family Creation" you will see the "+Post New Thread" button
            Freelance BIM Provider at Autodesk Services Marketplace | Linkedin


              I see it now. Thanks, Alfred.


              Related Topics