Revit: Text Parameter Value Driven by Four Yes/No Parameters

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:

  1. If two or more of the four Yes/No parameters are checked, the value of TEXT is to be “SELECT ANY ONE”.
  2. If none of the four Yes/No parameters are checked, the value of TEXT is to be “NO TEXT”.
  3. If only the A parameter is checked, the value of TEXT is to be “A”.
  4. If only the B parameter is checked, the value of TEXT is to be “B”.
  5. If only the C parameter is checked, the value of TEXT is to be “C”.
  6. 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