View Full Version : Using On/Off parameters in formulas - It is possible!!
Chad Smith
2004-05-13, 02:32 AM
I'm not sure if this has already been covered, I can't find one in a search.
It is possible to use the On/Off parameter in a formula.
Currently the only way to change the value of an On/Off parameter is to do a boolean operation using NOT.
e.g. = NOT('Another On/Off Parameter')
So using the practice that you can reference another parameter, you set up 2 parameters, one called On the other called Off, but these parameters are not associated with any objects.
So then when you want to do a formula you can now reference to those to parameters.
e.g. = IF('Something' > 'Something Else', On, Off)
To easy. 8)
It's not elegant but it works, and can be a nice hack until proper formulas using On/Off parameters can be used. Check out the attachment.
Steve_Stafford
2004-05-13, 03:11 AM
David Conant addressed this recently... HERE (http://www.zoogdesign.com/forums/phpBB2/viewtopic.php?t=3649&highlight=parameter)
Steven Campbell
2004-05-13, 03:24 AM
Here is a cheat sheet I use for conditionals.
Steven Campbell
Autodesk Revit
[code:1:0454b961d0]
Simple IF
IF ( <condition>, <result-if-true>, <result-if-false>)
IF ( Length < 35' , 2'-6", 3'-0" )
Simply IF - AND
IF ( AND (x = 1 , y = 2), 8 , 3 )
Simply IF - OR
IF ( OR ( A = 1 , B = 3 ) , 8 , 3 )
Multiple IF
IF ( Length < 35' , 2' 6" , IF ( Length < 45' , 3' , IF ( Length < 55' , 5' , 8' ) ) )
IF - with "A" less then or equal to "B" - current work around
IF ( NOT ( A > B ) , 8 , 3 )
Boolean Parameter - Yes/No parameters
Length > 65'
Not ( Length > 45' )
NOT(<condition>)
AND(<cond_1>, <cons_2>, ... <cond_n>)
OR(<cond_1>, <cons_2>, ... <cond_n>)
Only numeric parameters may be defined by formulas
<= and >= are not implemented yet
"a <= b" can be written as NOT(a > b).[/code:1:0454b961d0]
truevis
2006-02-12, 11:28 PM
Mr. Campbell's post isn't displaying right on my browser. I've tried to clean it up:
IF ( <condition>, <result-if-true>, <result-if-false>)
IF ( Length < 35' , 2'-6", 3'-0" )
Simply IF - AND IF ( AND (x = 1 , y = 2), 8 , 3 )
Simply IF - OR IF ( OR ( A = 1 , B = 3 ) , 8 , 3 )
Multiple IF IF ( Length < 35' , 2' 6" , IF ( Length < 45' , 3' , IF ( Length < 55' , 5' , 8' ) ) )
IF - with "A" less then or equal to "B" - current work around
IF ( NOT ( A > B ) , 8 , 3 )
Boolean Parameter - Yes/No parameters
Length > 65' Not ( Length > 45' )
NOT(<condition>) AND(<cond_1>, <cons_2>, ... <cond_n>)
OR(<cond_1>, <cons_2>, ... <cond_n>)
Only numeric parameters may be defined by formulas <= and >= are not implemented yet "a <= b" can be written as NOT(a > b).
Anything new on this front?
Mr Spot
2006-02-13, 05:42 AM
Wouldn't be easier to not have the On and off parameters?
For instance:
Outlets (integer parameter)
Outlet 1 = OR(Outlets = 1, Outlets = 2, Outlets = 3)
Outlet 2 = OR (Outlets = 2, Outlets = 3)
Outlet 3 = Outlets = 3
This should essentially achieve the same result with two less parameters.
Sorry, just checked the date on this thread... Its very old. Didn't realised Truevis had revived it.
I am not getting it.
I have a widow with 3 options
No Grille
Grille 1
Grille 2
I want to select one and have the others OFF
How do I do this?
I am not getting it.
I have a widow with 3 options
No Grille
Grille 1
Grille 2
I want to select one and have the others OFF
How do I do this?
There is actually a few solutions for what you want to do but the easiest is to create a new interger parameter called Switch.
Now for each On/Off parameter Tell it this.
No Grille = Switch = 1
Grille 1 = Switch = 2
Grille 2 = Switch = 3.
I've posted in a few thread regarding this issue.The thing is revit can't at this time do a three way switch for On/Off parameters properly where tell it you 2 off when this one is on. So there a few work arounds for this.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.