How to split text at a character using PropertyWizard for Revit

PropertyWizard V1-8-2 gives you several ways to extract one piece of text from another. This post explains how to split a text like this into two pieces at the semicolon:

E:9.9;N:10.8

There are three steps:

  1. Find the position of the semicolon
  2. Extract the first part of the text
  3. Extract the second part of the text

In a real project, you do not need to do step 1 separately: I am just splitting it out as a separate step here to show you how the formulas work.

Continue reading “How to split text at a character using PropertyWizard for Revit”

New trig function ‘atan2’ in PropertyWizard V1-8-2

PropertyWizard 1-8-2 includes an extra inverse tan function, ‘atan2’:

atan2(<y-value>, <x-value>)

The new function allows you to calculate the angle of a line from the line’s Y and X components (note the order of the arguments!) and it will return angle values from -π to +π radians (-180 to +180 degrees).

This is more versatile than the existing function ‘atan’, which can only return angles from -π/2 to +π/2 radians (-90 to +90 degrees).

Continue reading “New trig function ‘atan2’ in PropertyWizard V1-8-2”

New text case functions in PropertyWizard V1-8-2

There are three new text case functions in PropertyWizard version 1-8-2. They allow you to change text between lower and upper case, and to capitalise the words of a piece of text.

toLowercase(<text>) and toUppercase(<text>)

These two functions convert text to lowercase and to uppercase respectively.

They are useful when you want to enforce a particular annotation standard. For example, if you want to change all the Room names in a project to uppercase, you can use a formula like this:

toUppercase(Name)
Continue reading “New text case functions in PropertyWizard V1-8-2”

New text extraction functions in PropertyWizard V1-8-2

There are three new text extraction functions in PropertyWizard version 1-8-2. They give you more options for extracting sub-strings from a string of text, alongside the existing substr(<text>, <index>, <count>) function.

substr(<text>, <index>)

This new function returns the end of the <text>, starting from character number <index>. The first character index is zero.

This operates just like substr(<text>, <index>, <count>) but returns all the characters from <index> to the end of the text, not just <count> characters. It’s useful if you want to get rid of the first <count>+1 characters from the text, but don’t know how long the text will be.

Continue reading “New text extraction functions in PropertyWizard V1-8-2”