Forums
|
Forums >> Revit Building >> Technical Support >> Parameter Formula
|
|
|
active
Joined: Mon, Oct 30, 2006
25 Posts No Rating |
PARAMETER FORMULA I am trying to work on a parameter formula to allow me to correctly flex a component. See attached image. Here is what I need the parameter formula to do: Length<=4' THEN 2 Length>4' upto and including 8' THEN 3 Length>8' but less than 12' THEN 4 Length=>12' but less than 16' THEN 5 Length=>16' THEN 6 That is it....let me know if you guys have any ideas in mind. Thanks, Recit
|
This user is offline |
|
 | |
|
|
active
Joined: Sun, Apr 25, 2004
1207 Posts
 |
You can follow these guidelines for some more ideas. • Use conditionals in the definition of the parameter whose value is conditional. • In the Formula column next to the appropriate parameter, type the formula for the parameter. Noticethat the formula begins with an equal sign (=). • IF based on one test statement: =IF (Test Condition, Result if true, Result if false)IF ( Length < 35' , 2'-6", 3'-0" ) • IF based on more than one test: =IF (AND/OR (Test1, Test2) Result if true, Result if false)IF ( AND (x = 1 , y = 2), 8 , 3 )IF ( OR ( A = 1 , B = 3 ) , 8 , 3 ) • IF based on a negative test: =IF ( NOT (Test Condition), Result if true, Result if false)IF ( NOT ( A > B ) , 8 , 3 ) • Simple result if True, another IF if false: =IF (Test Condition, Result if true, IF (Test Condition, Result iftrue, Result if false ))IF ( Length < 35' , 2' 6" , IF ( Length < 45' , 3' , IF ( Length < 55' , 5' , 8' ) ) ) • Set one YES/NO parameter to the opposite of another: =NOT Y/N Parameter The question though is a complex conditional formula the best solution? Depending on what you are making can the array be driven by a type catalog? Can you do a first/last array and evlauate spacing via a formula that is simpler? Having a multi-nested conditional formula can lead to performace problems within the family. Of course that may not be a problem if you only have a couple of occurances within the project. If you have hundreds or thousands of them, then it is a different story. Without knowing more details it is hard to say what is the best option.
Edited on: Mon, Feb 26, 2007 at 5:38:09 PM
-----------------------------------
Tom www.reviteer.com http://twitter.com/Reviteer |
This user is offline |
View Website
|
 |
|
active

Joined: Thu, Dec 16, 2004
792 Posts
 |
Recit, Take a look at the metalStud family I attached to my post here and see if the parameters in there help any. I use some parameters to control visibility and when/how an array functions based on the length of the family (it's line based so adapt as necessary). Let me know if you have any questions about it.
-----------------------------------
-//------------------------
Carl - rkitecsure[at]gmail.com
Need help? I'm probably in my chat room!
You fell victim to one of the classic blunders. The most famous is never get involved in a land war in asia, but only slightly less well known is this! Never go in against a Sicilian when death is on the line! |
This user is offline |
View Website
|
 |
|
active

Joined: Wed, Oct 11, 2006
14 Posts No Rating |
Try this... If (Length < 3'11 63/64", 2, (If (and (Length >4' 0",Length < 8'0 1/64" , 3, (If (and (Length >8' 0",Length < 12'0" , 4, (If (and (Length >11' 11 63/64",Length < 16'0" , 5, (If (Length < 16' 0 1/64", 6, 0))))))))) Length must be a Length Parameter, and the Object parameter to be an Integer. Less than / greater than or equal to (<=, >=) don't work, so you need to make determinations on tolerances. I used 1/64th in this case. You also need to have a "Catch all" which is the final Parameter, for any open loop, or instance not covered. It acts as a check. I used Zero (0). I hope this helps...
|
This user is offline |
|
 |
|
active

Joined: Wed, Oct 11, 2006
14 Posts No Rating |
You know, shortcut smileys shouldn't be active on a site that discusses LISP........ Everywhere you see a smiley in my previous post, assume a close parenthesis.....
|
This user is offline |
|
 |
|
active
Joined: Mon, Oct 30, 2006
25 Posts No Rating |
THANKS GUYS FOR YOUR HELP. I CAN HANDLE EASY FORMULAS, BUT THE COMPLICATED ONES STILL BEAT ME DOWN! I'LL LET YOU KNOW IF IT WORKS.
|
This user is offline |
|
 |
|
active
Joined: Mon, Oct 30, 2006
25 Posts No Rating |
Guys, after all your suggestions, here is the winning formula: if(Length = 16', 5, if(Length > 16', 6, if(Length = 12', 4, if(Length > 12', 5, if(Length = 8', 3, if(Length > 8', 4, if(Length > 4', 3, 2))))))) I learned that it makes a difference the sequence of numbers. That is to say that in the above formula begining from the bigger number and ending with a smaller number allows me to end it nicely. the numbering sequence is critical in the formula's behavior. In this case a decreasing sequence works much better than an increasing manner because it closes nicely with the last TRUE,FALSE)
|
This user is offline |
|
 |
|
active

Joined: Wed, Oct 11, 2006
14 Posts No Rating |
I have found that the best way to stay organized with nested LISP Statements is to write each requirement on a line of excel and add XXXX under false, and then start at the bottom and enter the line into the previous line's false requirements... Like this>>> If (Length <= 4' 0", 2, xxxx) If (and (Length >4' 0",Length < 8'0" , 3, xxxx)If (and (Length >8' 0",Length < 12'0" , 4, xxxx)If (and (Length >12' 0",Length < 16'0" , 5, xxxx)If (Length <= 16' 0", 6, 0)
Turns into:
If (Length < 3'11 63/64", 2, (If (and (Length >4' 0",Length < 8'0 1/64" , 3, (If (and (Length >8' 0",Length < 12'0" , 4, (If (and (Length >11' 11 63/64",Length < 16'0" , 5, (If (Length < 16' 0 1/64", 6, 0))))))))) (If (and (Length >4' 0",Length < 8'0 1/64" , 3, (If (and (Length >8' 0",Length < 12'0" , 4, (If (and (Length >11' 11 63/64",Length < 16'0" , 5, (If (Length < 16' 0 1/64", 6, 0))))))))(If (and (Length >8' 0",Length < 12'0" , 4, (If (and (Length >11' 11 63/64",Length < 16'0" , 5, (If (Length < 16' 0 1/64", 6, 0))))))(If (and (Length >11' 11 63/64",Length < 16'0" , 5, (If (Length < 16' 0 1/64", 6, 0))))(If (Length < 16' 0 1/64", 6, 0))
|
This user is offline |
|
 |
 |
Similar Threads |
|
please help |
Revit Building >> Technical Support
|
Thu, Aug 31, 2006 at 9:24:29 AM
|
2
|
|
Revit MEP lookup tables / csv files |
Revit Systems >> Technical Support
|
Sun, Sep 2, 2007 at 12:27:00 PM
|
1
|
|
Family Type Parameter Value Controlled By Formula Not Grayed Out In Project |
Revit Building >> Technical Support
|
Fri, Feb 5, 2016 at 5:03:42 PM
|
1
|
|
Lookup Tables again |
Revit Systems >> Technical Support
|
Thu, Jul 31, 2014 at 1:39:28 PM
|
2
|
|
<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
|
 |
|
Site Stats
Members: | 2191558 | Objects: | 23399 | Forum Posts: | 152472 | Job Listings: | 0 |
|