PropertyWizard treats Revit’s Yes/No parameters as True/False boolean values. So it is easy to use Yes/No parameter values in formulas, and it’s easy to set Yes/No parameters from formulas.
Using Yes/No parameter values
You can use a Yes/No parameter value anywhere that is expecting a True/False data value. So you can use them:
- As the <condition> in an if() function
- In the logical functions and() and or()
- In the logical operator expressions And, Or and Not
For example, to use an if() function to tell if a wall top is attached, you would do something like this:
if([Top is Attached], "Top is attached", "Top isn't attached")
Similarly, to indicate the walls that have both top and base attached, you could use an and() and an if() like this:
if(and([Top is Attached], [Base is Attached]), "Base and Top are both attached", "Base and Top are not both attached")
Setting Yes/No parameters
You can set a Yes/No parameter using any expression that results in a True/False value.
- The literals true and false
- The identifier of a True/False parameter
- The identifier of a boolean API Property
- The logical functions and() and or()
- The logical operator expressions And, Not, Equal, Greater than, etc.
So if you have a Yes/No project parameter, you can set it by simply using:
and([Top is Attached], [Base is Attached])