Welcome to the Revit Ideas Board! Before posting, please read the helpful tips here. Thank you for your Ideas!
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Allow binary outputs for yes/no parameter conditional statements

Allow binary outputs for yes/no parameter conditional statements

When setting yes/no parameters with a conditional statement, Revit currently requires that you set the result-if-true and result-if-false values via true and false mathematical statements. 



test         = 90 mm
test1  [√]   = if(test=90 mm, 1=1, 1=2)
test2  [ ]   = if(test=90 mm, 1>2, 1<2)
test3  [√]   = if(test=90 mm, 1<2, 2<1)
test4  [√]   = if(test=90 mm, (1+8/2+1)>2+3, 1=2-1)
test5  [√]   = if(not(test=90), roundup(sqrt(test/1mm)/2)=4, 1=abs(rounddown(tan(test/2mm*1°))-2))



This method reduces readability, and increases the chance of errors.


Most other languages handle conditional statements by allowing the user to either use the words 'true' and 'false' to state the output, or allow for binary states (1=true, 0=false).



test         = 90
test1  [√]   = if(test=90, 1, 0)
test2  [ ]   = if(test=90, 0, 1)



To me, this seems solvable by simply altering how parameter formulas perceive 1 and 0, when used as a function for a yes/no parameter. I would really appreciate this, and it would greatly improve programming of parametric models, and their subsequent testing, stressing, and validation.



Yes. That last formula works...




You are over complicating this. Yes/No parameters don't need an if statement for a formula. All you need is "Test=90mm". If its true, the parameter is toggled to yes. If its false, its no.


Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Autodesk Design & Make Report

Autodesk Design & Make Report