Let’s say you have a family that has shape handles for instance dimensions (Length Parameters). What if you want to use it for quick prototyping, and then switch that same family into a version that uses Type based parameters?

Here’s how I went about it:

  • Change all existing Reference Planes to “Not a Reference”

  • Create new Reference Planes
  • Create new instance parameters bound to those Reference Planes

  • Lock one of the planes on each Dimension to existing origin planes
  • Create a corresponding set of Type dimensions
  • Create a set of Yes / No parameters for “Use Type for …”

  • Create formula like:
    if(Use Type for X, x type, x instance)
  • Apply it to the original parameters (the ones that are driving geometry):

How to Use:

  • Place the family
  • Resize using the shape handles (instance dimensions)
  • Then,
  • Create a Type
  • Modify the type Values and Tick the “Use Type” box

At this point, the Shape Handles are still visible, but only the Type values are used for the geometry.

Download Sample Family Here – Revit 2018:

AR_Generic_Placeholder_DC_FMP

Note: A future development of this family could be to make an inverse visibility parameter that switches off the Shape Handles once the Type Value is enforced.

I once built an auto-sizing Fire Pipe Fitting using a Formulaic method (where the various fitting sizes were driven by the Revit intersection variable), so I was interested to read about a similar strategy in a very good article in AUGIWorld January 2018 by Todd Shackelford.  It is really good to evaluate these different options before going ahead on a detailed Family development and creation task.

Among other things, Todd describes how to create a Type Catalog, including a list of the various data types:

He also describes how to use multiple Lookup Tables in a single Revit Family:

 

Overall, it is a very informative article for advanced Revit family creators.

 

Check out the full article online here:

page 36

Typically when editing Revit families, if you want to deal with arrays and stop them breaking when the count is 1, you set up some IF() formulas in Revit. However, a recent comment by David over on Revit Beginners describes another possible method:
Thank you Luke. Another possible solution is to nest the element into an adaptive component family, then nest the adaptive onto a conceptual mass family surface and use the repeater tool which can have an array count of 1. 

I posted about this method a while back:

Download the example file here

Mehmet Polat Diker has been busy doing some interesting Revit things over at Red Hot BIM. Like this little family that takes two dates and checks if the “deadline” has past or not. Some pretty detailed formulas here – nice work.

Download:
D_GEN_DEADLINE.rfa (Revit 2015)

The deadline family has 2 data entry parameters:
DateA and DateB. Family expects DateA to be earlier than DateB by default.

It has 2 check parameters:
DateAcheck and DateBcheck. These parameters show how the family interprets the dates we’ve entered.

Read the whole post:
http://www.redhotbim.com/2014/05/revit-deadline-calculate-days-between.html

He has also made a Calendar family:
D_GEN_CALENDAR.rfa (Revit 2015)
from
http://www.redhotbim.com/2014/05/revit-calendar.html

Chris Price has been pushing the limits.  Check it out:
“What I found was Revit would crash at around 580 conditional statements in a single formula… Surely Autodesk should know someone would try and do this, lol!

So how to get around this limitation, my first thought was to try and use “And” and “OR” conditions to try and reduce the number of required conditions. However, this was going to be extremely tedious and there would still be 168+… So then I decided to simply split across a couple of parameters. EG: I had 500 conditions in one parameter then linked to a different parameter with the remaining conditions. SOLVED!

I did note a large performance hit when changing parameters in the family editor. Changing any values would take 5-15 seconds. However, testing in a project and the changes are instant! So not sure why performance is fine in a project.”

Read more at:

Nice tip from Revit Rants on how to round values within a family – and it allows much greater flexibility as to the rounding increment.  In the example below, Chris uses ROUNDUP to round to a 5mm degree of precision.  You could combine his method with Shared Parameters to ensure that the resulting value is schedulable (make Param2 a shared parameter in the example given below):

Quote:
I have a parameter called “Param1” that I want to drive “Param2” from.

Param2 = (roundup((Param1 + 5 mm) / 5 mm)) * 5 mm

Read more:
Revit Rants: Revit Formula Rounding

A couple of formula tricks from the CAD Shack:

Pick One and Only One






Here the condition number will allow only one paramter to be true in a list. Associated with a type, you could control a ton of things simply back picking the correct type.

“Don’t Change Me Bro”

If you need some text to not change, put that text in the Formula column with quotes around it. It greys it out in the Value column. This should stop the majority of users from changing its value.

via
CAD Shack: Revit Family Formula Examples and Tricks

This is an example of an family with an array that kinda mimics a curtain that opens and closes.
http://revitlog.nl/images/stories/families/82_meubels/82_gordijn.rfa

However – it is also a good example of what happens if you don’t create a fix for when an array drops to only one item.  You need to formulaically stop this from happening, by doing something like this:

Applied Array=if(Calculated Array>1,Calculated Array,2)

(where Applied Array is the parameter applied to the physical array in the family, and Calculated Array is the number that is formulaically derived)

Family via
Google Translate
of
http://revitlog.nl/index.php?option=com_content&view=article&id=395:11-gordijn-op-en-dicht&catid=113:logs-april-2012&Itemid=89

It is currently not possible to evaluate a text string in a conditional statement. You can have a conditional statement report a text string, but not check text and base a condition on it.
via
RevitCity.com | Help with If then statement

For the very best resource on Revit Formulas, go to:
http://www.revitforum.org/tutorials-tips-tricks/1046-revit-formulas-everyday-usage.html