Thursday, May 25, 2017

Family Type Formula Tips

Slow blogging week as I am in Knoxville, where my son is competing in Global Finals for Destination Imagination (DI) this week. DI is something like a cross between science fair and drama club... and culminates with Global Finals, which includes 15+ countries, 1,400+ teams and over 8,000 students.


As architects, engineers and designers we need to work with a lot of data in today's complex building design projects. I want to share a few tips about managing element type data in Autodesk Revit.

Notice in the image below there are several types. I have worked on families with many, many more. If we create a parameter, or want to change an existing parameter, it can be time consuming. Before I figured out a few tricks, I found myself changing the Type name drop-down, editing the Value and then repeating until all the types had been changed.


In the example below, I want to uncheck Show Type Mark for all types. Currently, some may be on and some off.


One way to quickly achieve this is to temporarily enter a Formula. In this case I know Show Symbol is currently checked for all types, so I entered the formula not(Show Symbol). This unchecked Show Type Mark for all types. To finish, apply and then delete the formula.


This would not have worked if Show Symbol had some types unchecked. In this case, I could create an IF statement to handle this... however, they can be a little tricky for Yes/No parameters.

We can use any length parameter (I use Outline Height in this example) and see if it is greater than, or equal to, a certain value that will always produce a false result.

A first attempt might look like this:

  • if(Outline Height > -1', 0, 0)


However, Yes/No does not equate to 0 or 1, or True or False, in a formula.

Per a previous post from Steve Stafford, this does work:
  • if(Outline Height > -1', 0 = 1, 0 = 1)

This technique could also be used if you still needed one or two types checked; turn everything off and then check the required ones individually. Similar to the Filter dialog; selecting Check None to quickly clear the list and then individually checking the few needed.

Another example of using this trick is when you want to change one of the length parameters, for every type, shown in the previous image. Simply type in the desired length in the Formula column, apply it and then clear the formula. The length has been reset for every type.


Finally, if the family name is specific then the related parameters should not be editable. For example, if the family name is 480V Water Heater, then all types in that family should be hard-wired to 480V as shown below. This formula would be left in place, not deleted, so the designer cannot possibly change it in the project environment.


We can also use Revit schedules to accomplish some of this, but I will save that for a future post.

Feel free to share some of your related tips in the comments.