Do you want to create dynamic parametric families in Revit that can be adapted with the push of a button? With the right formulas, this is entirely possible. In this article, we'll look at three different methods for creating instant-space families using yes/no parameters, integer spinners and data validation. By taking advantage of these techniques, you'll have an understanding of how to make your own parametric families that are both intuitive and easy to manage. So let's get started! In this article, I'm going to show you how to use Revit formulas to create dynamic parametric families that can be altered at the push of a button. We'll look at three different methods: using yes/no parameters, integer spinners, and data validation. By the end of this tutorial you will have an understanding of how to make your own instant-space families with well thought out formulas that are more intuitive and easier to manage than huge type catalogs and endless duplication of types during the design development phase.



Method 1: Yes/No Parameters - We'll start by creating a sample cube family. I'm going to add a yes/no parameter in the visibility category called "front". Now we can write an "if" formula in the instance that ties our yes/no parameter to the visibility of our geometry. The formula reads: If front is true, then this cube is visible. Try it out and you can see that when you turn on the front option, the cube appears and when you turn it off, it disappears.

Method 2: Integer Spinners - Next let's look at integer spinners. This time we're going to add another parameter in the Constraints category called PIP Side Number. Here we can make an integer spinner that will cycle through different visibility options. We'll write the formula for each option, so when PIP Side Number = 1, the front is visible and when it equals 2, the other side is visible. This formula looks a little different because true/false parameters are inherently truthy so we can leave off the "if" conditional and type in the true condition for each. 

Method 3: Data Validation - Finally, let's look at data validation. How would we allow a user to type in any length and use data validation to have the correct outcome? By setting up a few parameters we can write a simple formula that will clamp down the possible outcomes of user input. To start, let's set up two parameters in the Constraints category called "Min length" and "Max Length". Then we'll add another parameter in the Dimensions category called "Enter Length". 

We'll write our formula like this using an "if" statement and an "else if": if Enter Length is less than Min length, then Actual Length = Min length. Else if Enter Length is greater than Max length, then Actual Length = Max length. To force the validation to only accept lengths at a specified interval, we can add a round modifier and then divide and multiply the entered length by our desired increment. Paste this into Actual Length and now you can see that any length entered will automatically snap to the nearest increment. 

By using formulas in Revit we can make dynamic parametric families that are more intuitive and easier to manage. With well-thought out formulas, a family can abide by the rules of a real world product such as minimum and maximum sizes. If you found this video helpful feel free to drop us a like or comment and don't forget to subscribe for more tutorials and Revit tips and tricks. Thank you!

 

Back to Blog