How to use the ‘+’ operator in PropertyWizard

The third tutorial in PropertyWizard Help shows you how to join text values together using the ‘+’ operator:

PropertyWizard Formula window showing string concatenation formula
Joining texts with the ‘+’ operator

The ‘+’ operator works differently depending on whether the values either side of it are numeric (numbers, lengths, areas, etc.) or text.

If the values are both numeric

The ‘+’ acts as a plus sign and adds the numbers together.

Of course, the numbers have to have the same units, e.g. both can be Areas, or both can be simple numbers. You cannot add 2 feet to the number 4, for example. Just as with Revit family formulas, if you try to add incompatible values, you will get a ‘Type Mismatch’ error like this:

PropertyWizard Result Check dialog showing a Type Mismatch error
Type Mismatch error

If the values are both text, the ‘+’ joins the texts together.

Note that ‘+’ doesn’t introduce any ‘joining character’ in between the texts, so if you need to introduce spaces or commas you need to type them in the formula.

You can see how in this formula, I’ve included a space after ‘is’ and a space before ‘long’, so that I get a space before and after my wall’s Length value.

"This wall is " + Length + " long."

The old post ‘How to use PropertyWizard for Sheet Numbers‘ has another example of using the ‘+’ operator to join text values together. The BS 1192 numbering it shows is somewhat outdated, but the principle is sound.

If one value is text and the other is numeric

PropertyWizard converts the numeric value to text and then joins the two texts together. I covered how Revit does this numeric-to-text conversion in yesterday’s post.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.