Revit MEP Forum
Welcome to Autodesk’s Revit MEP Forums. Share your knowledge, ask questions, and explore popular Revit MEP topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lookup table Text

8 REPLIES 8
Reply
Message 1 of 9
mehrdadjavaheri
5352 Views, 8 Replies

lookup table Text

Hi

I use revit 2018 And i want to return text from lookup table .

1- I used BS##other## and BN##other## for header of my columns that had text and number (image1)

2-In revit family type i created parameter : Name:Bolt size  Discipline:Common   Type Of parameter : Text & Instance

3-in formula i typed size_lookup(Lookup Table Name, "BS", "NA", Nominal Diameter) and i got this error  "Inconsistent Units" 

4-when i exported csv file i wondered because i saw my headers hsd been changed to BS##number##feet And BN##number##feet

1.JPG

2.JPG3.JPG

8 REPLIES 8
Message 2 of 9

Hello @mehrdadjavaheri,

 

lookup tables, also called 'Size lookup tables' have columns that contain only size data. So only numbers no text.

So you can't make a column with text that you want to read.

 

But there is one column that can have text values and that is the first column. Smiley Very Happy

 

So here is the solution:

 

place text values in the first column.

Note: Cell A1 must stay blank!

 

You need to read the first column by using the following formula:

size_lookup(Lookup Table Name, "", "not found", Nominal Diameter)

 

This formula will read for the Nominal Diameter column B and returns the value of column A for the found diameter.

 

see the result in the picture below:

 

1e kolom uitlezen size lookup.png

 

1e kolom uitlezen size lookup csv.png

 

 

 

 

 

 

If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!

Kind regards,
Robert Klempau
Senior Consultant AEC
Cadac Group AEC BV

Message 3 of 9

Hi

But one of my friends solved one of my files with his revit but i can't. Please open attachment

Message 4 of 9

hello @mehrdadjavaheri,

 

your CSV file has to look like this:

 

csv M8.png

 

The first column is the Text column that you are going to read.

 

Change your CSV file and load it into your family.

Change the formula for your Text parameter. 

 

Your formula for Text must look like this:  (Remove the the T in the formula)

 

fam parameters.png

 

If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!

Kind regards,
Robert Klempau
Senior Consultant AEC
Cadac Group AEC BV

Message 5 of 9

Hi 

But this revit family file works good. if you change the nominal diameter in family the text returns successfully . your solution in good for one text parameter but i want to have two text parameter.

Message 6 of 9

Hello @mehrdadjavaheri,

 

Unfortunately, you can only read the first column from a lookup table as a Text value.

 

What you could do is read several lookup tables in one family Type.

 

2x lookup.png

 

You only need the first end second (lookup column) in the second CSV file

 

Test2.csv:

 

Excel.png

If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!

Kind regards,
Robert Klempau
Senior Consultant AEC
Cadac Group AEC BV

Message 7 of 9
ricaun
in reply to: mehrdadjavaheri

Hi

Revit 2019 now works and return text from lookup table.

 

I created this lookup file.

 

,text##other##,description##other##
1,1,Number one - Revit 2019
2,2,Number two - Revit 2019

 

The results

=size_lookup("lookup", "description", "", "1") return "Number one - Revit 2019"
=size_lookup("lookup", "description", "", "2") return "Number two - Revit 2019"

 

If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!

 

 

 

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

Message 8 of 9
MGO-Norsyn
in reply to: ricaun

Also using Revit 2019, but I am pretty sure, you need to add double quotes to your text values in .csv file.

Se my example: http://mgrevitblog.blogspot.com/2018/05/lookup-table-text.html

Message 9 of 9

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report