Announcements

Community notifications may experience intermittent interruptions between 10–12 November during scheduled maintenance. We appreciate your patience.

Revit family with multiple lookup tables

Revit family with multiple lookup tables

mroble
Advocate Advocate
3,786 Views
7 Replies
Message 1 of 8

Revit family with multiple lookup tables

mroble
Advocate
Advocate

I'm making a parametric centrifugal (end suction) pump, and I'm using a revolve, and using a lookup table for the nozzles.

 

In an attempt to allow me to have different size suction and discharge connections (which is pretty standard), I made a SuctionConn parameter, and a DischargeConn parameter.

 

I'm thinking, but not certain, that I'll need two lookup tables for this.

One to match the value to whatever my SuctionConn is set to, and another to match to the value my DischargeConn is set to.

I can see where it allows you to have multiple lookup tables embedded, that's easy enough, but what's the simplest workflow for this?

This could even be a moot point if one lookup table can lookup based on two difference criteria. Which means I'll just need to formulate properly in my parameters.

 

If I, do indeed, need two, how do you formulate for that? I know right now, you make a text parameter called "Lookup Table Name" and in Value, you type in the name of the CSV you embed. But what if there's two tables?

0 Likes
Accepted solutions (2)
3,787 Views
7 Replies
Replies (7)
Message 2 of 8

L.Maas
Mentor
Mentor
Accepted solution

The formula for a lookup table is

result=size_lookup(LookupTableName, LookupColumn, DefaultIfNotFound, LookupValue1, LookupValue2, LookupValueN)

 

This means you can have multiple lookup tables (point to different lookuptablename). Make sure those tables are loaded into the family

 

You also can see that you can get different results from the same table. If you vary the the lookupcolumn. It will pull the value from that lookup column depending on the lookupvalue(s).

So you could have lookup column suction and a lookup column discharge

 

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

Message 3 of 8

mroble
Advocate
Advocate

Let me make sure I got this...

The formula you say is: size_lookup(LookupTableName, LookupColumn, DefaultIfNotFound, LookupValue1, LookupValue2, LookupValueN)

 

 

LookupTableName, refers to the Text parameter sending me to the "Pump Table.csv" I have embedded.

Look up column, is the value I want retrieved... so i'm looking for flange diameter, so I put my parameter DiscFlgDia

 

After this is where I start getting a little confuzzled. I'm seeing 4 more values here than in what I found to study up on these tables.

 

What ARE those 4 extra values, and what are they doing?

 

And thank you for your help by the way!

0 Likes
Message 4 of 8

mroble
Advocate
Advocate

Sorry, I know the first value, of those four I asked about, what to reference to get the value out of the DiscFlgDia column..

0 Likes
Message 5 of 8

mroble
Advocate
Advocate

Currently this is what I got...

 

I'm using a revolve, so I got "radius" parameters... but my information I have is in "diameter", I linked them by putting diameters in the table, and set my radius parameter to be "diameter/2"..

0 Likes
Message 6 of 8

L.Maas
Mentor
Mentor
Accepted solution

Ok

this is the minimum formula:

result=size_lookup(LookupTableName, LookupColumn, DefaultIfNotFound, LookupValue1)

DefaultIfNotFOund is the value if no right values are found in the table

The lookupvalue1 is the value you are going to check inside the lookuptable

 

The lookupvalue2 and so on is if you want verify multiple parameters.

Maybe you want to have a result based on the diameter of the entrance and the diameter of the exit.

Then it will return the result based on both those diameters 

 

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

Message 7 of 8

mroble
Advocate
Advocate

Thank you very much sir!

 

I'm thinking I'll need to flip the order of the Lookup Values depending on which connection I'm dealing with, correct?

Suction, I'll have the first lookup value looking point to the SucConn, and DisConn as value 2?

Vice versa for the Discharge connection parameters?

 

Or does this not matter?

0 Likes
Message 8 of 8

mroble
Advocate
Advocate
Ah!! Nevermind, something just occurred to me after I sent that. Haha

I'm all good! 😊
0 Likes