How to work with Revit’s Yes/No parameters in PropertyWizard formulas

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
Continue reading “How to work with Revit’s Yes/No parameters in PropertyWizard formulas”

Expressions in PropertyWizard for Revit

Expressions are the building blocks of PropertyWizard formulas. They are like phrases in a language.

It’s useful to understand the different kinds of expressions in PropertyWizard, so you can put them together in different ways to write better formulas.

There are four main kinds of expression in PropertyWizard:

  1. Literal expressions
  2. Identifier expressions
  3. Operator expressions
  4. Function expressions
Continue reading “Expressions in PropertyWizard for Revit”

How to filter Revit elements using an if() function

A PropertyWizard formula usually affects all the elements in the category you’ve selected. But what if you only want to affect a subset of the elements?

You can do this with an if() function in this form:

if(<filter criteria>, <your formula>, <target parameter>)

The <filter criteria> is where you choose which elements to affect, and the <target parameter> is the name of the formula’s target parameter. The <your formula> is where you put the formula that you want to apply to the selected elements.

For example, to affect only elements on Level 1, your filter criteria would be something like this:

if(Level.Name == "Level 1", <your formula>, <target parameter>) 
PropertyWizard Formula window showing a formula for the category 'Doors', Target Property is 'DWD-Test' and the Formula text is 'if(Level.Name == "Level 1", "This door is on Level1", [DWD-Test])'
Continue reading “How to filter Revit elements using an if() function”

How to use the if() function in PropertyWizard for Revit

PropertyWizard’s if() function works in the same way as the native Revit one, which is described in the online Help here:

The syntax is:

if(<condition>, <result-if-true>, <result-if-false>)

When PropertyWizard evaluates an if() function, it starts with the <condition>. For example in this formula:

if(Level.Name == "Level 0", "It's Level 0!", "It's some other Level!")

It will start by evaluating this expression:

Level.Name == "Level 0"

In PropertyWizard, the double-equals-sign ‘==’ means ‘is equal to’. So the value of the expression will be ‘true’ if the element’s Level’s Name is equal to “Level 0” and ‘false’ otherwise.

Continue reading “How to use the if() function in PropertyWizard for Revit”

How to fix Revit’s Filters with PropertyWizard

Revit’s ‘Filters’ feature is great for highlighting elements based on their parameters, but you are restricted in which parameters you can use.

For Walls, for example, you cannot use any of these ‘Constraints’ parameters in a filter:

Revit's Instance Properties panel for a wall

PropertyWizard lets you overcome this restriction – because you can set up a formula to copy the values of these ‘forbidden’ parameters into another parameter of your choice, and then you can set up a filter using that new, unrestricted parameter. PropertyWizard keeps the new parameter value updated, so your filter will ‘just work’.

Continue reading “How to fix Revit’s Filters with PropertyWizard”