Using an If yes/ no Statment to control a dimension parameter

Using an If yes/ no Statment to control a dimension parameter

Anonymous
Not applicable
2,462 Views
7 Replies
Message 1 of 8

Using an If yes/ no Statment to control a dimension parameter

Anonymous
Not applicable

I would like to control a Dimension parameter by using a if Statement. 

The goal is; when you check the Full Beam Pocket to yes it will automatically set the Beam Pocket Depth to equal the Panel Thickness, if no then it should remain 3 1/2"

The current formula is   ** if(Full Beam Pocket, 1, 0) = Panel Thickness ** 

 

If Statement.png

 

0 Likes
2,463 Views
7 Replies
Replies (7)
Message 2 of 8

barthbradley
Consultant
Consultant

aren't you there?

 

if(Full Beam Pocket, Panel Thickness, 3 1/2").

 

No?  

Message 3 of 8

Anonymous
Not applicable

That is the formula I entered and it is not working.   I'm not sure what needs to change.  I'm hoping someone can see what I'm missing.

 

 

0 Likes
Message 4 of 8

barthbradley
Consultant
Consultant

Make Panel Thickness an Instance Parameter

 

...or all the associated parameters Type Parameters

Message 5 of 8

aoffak
Contributor
Contributor

I tried to something similar but Revit 2022 was nice enough to give me a hint (<boolean>, <result if true, result if false). Therefore try the following to see if it works:

 

if(Full Beam Pocket, Stud Spacing, 3.5")

Message 6 of 8

mhiserZFHXS
Advisor
Advisor

If using a Yes/No parameter in a formula, you just need to type the parameter name and then the result if true and the result if false. Don't need an equal sign anywhere in the equation.

 

if(Yes/No Parameter, Result if True, Result if False).

0 Likes
Message 7 of 8

callumwebb
Explorer
Explorer

For clarification as I made this mistake, the above is correct however you only need the results no "If True" statement next to the results as below.

 

callumwebb_0-1744738972870.png

Message 8 of 8

Mike.FORM
Advisor
Advisor

@mhiserZFHXS was not sayin you need to write "If True". 

It is stating the first value is what will be used if the Yes/No Parameter is checked, ie "Result if True" and the second value is what will be used if the Yes/No Parameter is unchecked, ie "Result if False".

0 Likes