Forums
Forums >> Revit Building >> Technical Support >> Including different formula parameter for each type?
|
|
active

Joined: Wed, Aug 29, 2007
417 Posts
 |
Hello there,
Is it possible to have a formula in a parameter that changes per type? We have specific model numbers for the family we are creating that adds the letter R or L for a Right or Left hadn cabinet door. The formula we want to use, adds this letter into the model number based on if the Right/Left Hand yes/no parameter is selected. However, when we do this, the Parameter is locked and does not change per type.
For example:
Type one = 7121-29 | I want this to become 7121L29 for a Left hand door or 7121R29 for a right hand door.
Type two = 7121-35 | I want this to become 7121L35 and 7121R35
The parameter I am using is: if(Right Hand, "7121R29", "7121L29")
how might I change this parameter per type? Do I need to have some locked constraints to allow this parameter to change? Finally, adding one last thing to this parameter, is it possible to add an FB at the end of the model number if another yes/no parameter is checked?
Thanks for the help,
Lorne
-----------------------------------
AutoDesk Revit Certified Professional
Denver, CO
Revit Architecture |
This user is offline |
|
 |
|
site moderator|||
Joined: Tue, May 16, 2006
13079 Posts
 |
There are no string formulas available in Revit - we have wished for these for many years.
Sorry.
|
This user is offline |
|
 |
active

Joined: Wed, Aug 29, 2007
417 Posts
 |
Would it be possible to nest multiple If statements that are dependant on the width? Or would this be a completely different formula all together, AND OR statements, etc?
I.E.
If(Width=29",If(Right Hand, "7121R29", "7121L29"), If(Width=35",If(Right Hand, "7121R35", "7121L35"))
I haven't tried this yet, I was about to and saw your reply. I have 4 types 29", 35", 41" and 47" per each family that I need to nest into a formula if I can?
Thanks,
Lorne
Edited on: Tue, Sep 4, 2012 at 9:30:43 AM
-----------------------------------
AutoDesk Revit Certified Professional
Denver, CO
Revit Architecture |
This user is offline |
|
 |
site moderator|||
Joined: Tue, May 16, 2006
13079 Posts
 |
Obviously you CAN do that.
|
This user is offline |
|
 |
active

Joined: Wed, Aug 29, 2007
417 Posts
 |
ok just for the record and to update. I got it working using this formula:
if(Width = 29", if(Right Hand, "7121R29", "7121L29"), if(Width = 35", if(Right Hand, "7121R35", "7121L35"), if(Width = 41", if(Right Hand, "7121R41", "7121L41"), if(Width = 47", if(Right Hand, "7121R47", "7121L47"), "INVALID WIDTH"))))
Now I will try to add the FB to the end of the formula and keep you posted.
Thanks,
Lorne
-----------------------------------
AutoDesk Revit Certified Professional
Denver, CO
Revit Architecture |
This user is offline |
|
 |
active

Joined: Wed, Aug 29, 2007
417 Posts
 |
Ok yes I got it!
if(Width = 29", if(Rear Access Panel, if(Right Hand, "7121R29", "7121L29"), if(Right Hand, "7121R29FB", "7121L29FB")), if(Width = 35", if(Rear Access Panel, if(Right Hand, "7121R35", "7121L35"), if(Right Hand, "7121R35B", "7121L35FB")), if(Width = 41", if(Rear Access Panel, if(Right Hand, "7121R41", "7121L41"), if(Right Hand, "7121R41FB", "7121L41FB")), if(Width = 47", if(Rear Access Panel, if(Right Hand, "7121R47", "7121L47"), if(Right Hand, "7121R47FB", "7121L47FB")), "INVALED WIDTH"))))
Now it adds the FB when the Full Back casework is present.
-----------------------------------
AutoDesk Revit Certified Professional
Denver, CO
Revit Architecture |
This user is offline |
|
 |
active
Joined: Tue, Dec 18, 2007
146 Posts
 |
Why don't you just make a left hand type and a right hand type? You're making Revit think awfully hard about whether to write an L or an R. It has to perform this calculation for every instance in the project. You should avoid formulas in families wherever possible, as it just makes more work for the program. If you have a Left Door Type and a Right door type, Revit just does what it's told without any fancy computations. Done. (nice job on the formula, by the way! :-) )
-----------------------------------
jlights |
This user is offline |
View Website
|
 |
 |
Similar Threads |
<Family Type> parameter can't be controlled by formula. What else can we do? [ 1 2 ] |
Revit Systems >> Technical Support
|
Tue, Aug 27, 2013 at 3:53:53 AM
|
29
|
Parameter Formula |
Revit Building >> Technical Support
|
Tue, Feb 27, 2007 at 7:12:50 PM
|
7
|
Parameter names with dashes - problem with formula |
Revit Building >> Technical Support
|
Tue, Aug 31, 2010 at 10:28:39 AM
|
4
|
parameter formula to read the type name/family name |
Revit Building >> Technical Support
|
Tue, Jul 9, 2013 at 8:34:04 AM
|
1
|
formula using <Family type> parameter |
Revit Building >> Technical Support
|
Mon, Nov 1, 2010 at 10:01:58 AM
|
1
|
 |
|
Site Stats
Members: | 2109871 | Objects: | 23184 | Forum Posts: | 152302 | Job Listings: | 3 |
|