I came across an interesting request in the Autodesk Revit Architecture forum the other day. The person wanted to have four Yes/No parameters (called A, B, C and D) determine the value of a text parameter (called TEXT), based on the following conditions:
- If two or more of the four Yes/No parameters are checked, the value of TEXT is to be “SELECT ANY ONE”.
- If none of the four Yes/No parameters are checked, the value of TEXT is to be “NO TEXT”.
- If only the A parameter is checked, the value of TEXT is to be “A”.
- If only the B parameter is checked, the value of TEXT is to be “B”.
- If only the C parameter is checked, the value of TEXT is to be “C”.
- If only the D parameter is checked, the value of TEXT is to be “D”.
The solution I devised uses a series of nested if statements to work through all of the possibilities. The condition of the first if statement is an or. Each item in the or is an and of a pair of the Yes/No parameters. There is an and for each…
Read more