Lookup table formulla error I can't spot

Lookup table formulla error I can't spot

GTisRuleX
Advocate Advocate
3,458 Views
17 Replies
Message 1 of 18

Lookup table formulla error I can't spot

GTisRuleX
Advocate
Advocate

So I've been using a lookup table to provide part names on some of the content I generate for the company I work for.  I've used this formula dozens of times now (Or similar method).  Occasionally Revit will throw this error;

 

You can see in the screenshot above that the formula actually works.  Alternate Description is being populated with the correct info.  This error only gets thrown when "OK"ing out of the part, or changing the Type Name dropdown to a different size.

"Alternate Description" is a TEXT field. ND1,2,3 are all instanced based.  The Lookup Table loads with no errors.

 

This happens about 25% of the time I use this lookup method to fill out a part name.  I can't square out exactly what it doesn't like especially considering it's functioning until you click OK on the part.  Usually the repair is so many random things I try until it works it finally just works.  

 

This has been a major frustration I can't solve and push behind me, any help would be greatly appreciated!

namelookup.png

0 Likes
Accepted solutions (1)
3,459 Views
17 Replies
Replies (17)
Message 2 of 18

michael.coviello
Autodesk Support
Autodesk Support

@GTisRuleX-

Which build number of Revit 2016 are you using?  This information is in Help-->About Revit.

If this same worked in a previous version, Can you post the previous version too.

 

When Revit throws the error, do you have a journal file that you could share?

 

Please IM me if you prefer.  Thank you.

 

 



Michael C
Technical Support Specialist
What's New in Revit 2023 | Autodesk University | Revit Blog
0 Likes
Message 3 of 18

robert.klempau
Advisor
Advisor

Hello,

 

Can you upload the Lookup table so I can see what’s in there?

What I see is that you read text values from a lookup table. The size lookup mend to read length  values no text values. There is the Type Catalog file for.

Size_lookup(SizeLookup, “”,”000”,ND1,ND2,ND3)

What is the name of the column you want to get the value from.

I see “” instead of a name.

Solution that always works:

What you could do is read an info_code value from the lookup table (2). (last column with the unique number (1))

See picture below:

loopup 2.png

 

Than based on the number of the info_code parameter, use a formula for your Alternate Description parameter and use the if statements to produce the right values. (3)

See picture below:

lookup 1.png

 

Hope this method helps you to move on and get your family right.

 

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 4 of 18

fabiosato
Mentor
Mentor

Hello,

 

Actually the formula:

 

size_lookup(Table, "", "000", ND1, ND2) extracts the text value from the first column, I got this info at Revit OpEd blog.

The problem in your formula is that you are using the text separator " in the middle of the text, to avoid this problem I use in text instead.

Fábio Sato
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 5 of 18

GTisRuleX
Advocate
Advocate

Sorry, I've been out since Thursday.  So as mentioned above, searching for "" pulls the first value from the lookup table (The unnamed column to the far left of a lookup table.)

 

Here is my lookup table. 

 

The problem doesn't appear with my lookup table at all, I've also tried to use "FAIL" and both throw the same error in the first screenshot. 

csv.png

 

SS2 NAME LOKUP.png

 

I also removed the quotation marks from the .CSV.

0 Likes
Message 6 of 18

GTisRuleX
Advocate
Advocate
I have 27 different end conditions on 1 part that adjust in diameter and cut length that need to populate based on the connector sizes. This method would require one heck of an alias list but I like the concept of it. Something I need to remember in the future! Thanks for sharing!
0 Likes
Message 7 of 18

GTisRuleX
Advocate
Advocate
I removed the quotation marks from the lookup table and reloaded it, it's still failing. What's frustrating, is I've done this about a dozen times, and seem to have the same struggle every time I try to pull the first column.
0 Likes
Message 8 of 18

GTisRuleX
Advocate
Advocate
Update7 R2. It doesn't crash so there's no journal entry. It just tells me an invalid formula in the "" type. The part that drives me nuts is I can copy/paste this formula from families it works in just fine I've created before, but there always a struggle.
0 Likes
Message 9 of 18

robert.klempau
Advisor
Advisor

Hello,

 

can you upload a picture of your .csv file after you opend it in a tect editor?

It can be that you have a lot of comma's at the end of your file.

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

0 Likes
Message 10 of 18

robert.klempau
Advisor
Advisor

Do you see something like this in your csv file?

 

comma at end 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

0 Likes
Message 11 of 18

GTisRuleX
Advocate
Advocate

CSVTXT.png

 

Nope, it looks as expected.  When I first started using Lookup tables I fought the heck out of EXCEL until I could get it right on saving as .CSV.  I'm pretty familiar with the formats now.

0 Likes
Message 12 of 18

robert.klempau
Advisor
Advisor

Ok,

 

Take a look at my family and lookup table and compare yours with mine.

 

 

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

0 Likes
Message 13 of 18

GTisRuleX
Advocate
Advocate
All of your returned values are in quotations? I tried quoting the entire comment (avoiding the inch marks to simplify testing.)
Wouldn't this have the same effect?
"1x7/8x7/8" for example?

What's driving me nuts, is the expression is actually working. The value updates, I just can't "OK" out of the part without it throwing the "invalid formula".
0 Likes
Message 14 of 18

robert.klempau
Advisor
Advisor

Let me have a look at your family.

 

If you don't want to post it publicly you can send it to me by mail.

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

0 Likes
Message 15 of 18

GTisRuleX
Advocate
Advocate
Accepted solution

Holy cow, finally figured out what was going on with the help of my boss.

 

I created the lookup table parameter AFTER copying the family Type.  So my statement worked on the instance in the part builder at the time, since the new parameter value was only added to the single instance.  Since the lookup table name wasn't physically filled out on the duplicated types, it would cause it to fail on a nested part in the library, not the one on the screen I was editing at the time.

Copy/pasting the Lookup table name in every instance globally fixed the issue.

 

I can't seem to find a way to attach the family here, or I would post it just for others' information moving forward.

 

looup1.png

 

Message 16 of 18

fabiosato
Mentor
Mentor

Hello,

 

To avoid this problem in the future, if all types use the same lookup table, input the table name between quotes in the formula area, so all types will use the same table!

Fábio Sato
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 17 of 18

GTisRuleX
Advocate
Advocate
That is genious!
0 Likes
Message 18 of 18

thebimqueen
Participant
Participant

Tks for posting this, so helpful! I had the same issue spent hours trying to figure this out!