Family Parameter Formula to Report other text Parameter values

Family Parameter Formula to Report other text Parameter values

Anonymous
Not applicable
7,670 Views
3 Replies
Message 1 of 4

Family Parameter Formula to Report other text Parameter values

Anonymous
Not applicable

To keep this question / concept rather generic, I have a complex model with many options, such as Option 1, Option 2, Option 3, etc.  Let's say there are various pre-defined values that the user can enter in the value field for each Option that he can find on a chart.  The "type" of parameter for each Option is "text".  Each one of these (text) Parameter Values needs to then be reported in succession into another (shared) parameter to build the "Base Model Number".  So I need the Formula of Base Model Number to = (Option 1) (Option 2) (Option 3) etc.  Is there an adequate syntax to cover this?

 

I know I can build a tag to do this with a label comprised of the several shared parameters.  I've tested this and it works.  But I'd rather Schedule the Base Model Number than tag it.  I'm just really curious if Revit is capable of acheiving the concept of stringing together text parameter values as desired above.  Thanks for your help.

 

Oh, I'm developing this with Revit Architecture 2012 before upgrading it to all the newer versions one by one, just in case that detail matters.

 

Thanks again.

Accepted solutions (1)
7,671 Views
3 Replies
Replies (3)
Message 2 of 4

sfidler
Enthusiast
Enthusiast
Accepted solution

Unless they've added it in 2015, Revit doesn't have formulas that will concatenate text (i.e., result = parameter1 & " " & parameter2), and the 'if' function cannot test text values.  Nor can a lookup table return text values.

 

If you had one family where you really, really want to do this, and you are confident that you will never, ever, need to edit the resulting mess of a formula, and never ever blame me for the resulting nightmare, you can do a two-step approach.  In parameter one, build a simple if/then sum bsed on your options:

 

OptionInteger = if(option1, 1,0)+if(option2,2,0)+if(option3,4,0)+if(option4,8,0)..., going up by a factor of two for each option

 

Then build the most horrible formulayou have will ever see:

Model Number = if(OptionInteger=0,"Basic Model with No Options,if(OptionInteger=1,"Basic Model with Red Paint",if(OptionInteger=2,"Another Version",if(OptionInteger=3,"Oh for the love of God, why am I doing this",if(OptionInteger=4,"Why the heck won't Autodesk add this basic function","Model not known")))))

Have fun counting parantheses.  It helps to do it in word so that you can color code and indent.  I did this once and will never do it again.

 

 

 

Message 3 of 4

dtiemeyer
Advisor
Advisor

+2  that was funny and informative

My other CAD is a Cadillac and I like to Revit to the Max!
0 Likes
Message 4 of 4

nedwards9820
Enthusiast
Enthusiast

It's about time Revit supported all simple spreadsheet concepts.  Stop developing esoteric stuff and give us some basics! 

0 Likes