Join Eric Wing for an in-depth discussion in this video Creating an array, part of Revit: Families.
In this lesson, we're really going to start creating some parameter formulas to make our family be as interactive as possible. These families look easy when you're adding them to the model, but a lot is going on in the background to make this stuff work. Revit has left the door wide open when it comes to adding mathematical expressions to our families. One word of caution though, think it through. As you're about to see, it's really easy to get lost in the forest here. The objective of this lesson is to add expressions to our family, to array our styles automatically. We're going to allow the user to type in a maximum spacing for their styles, and we're going to do the math for them.
To get started, open your family called Styles and Rails. In my example, we gotta think about basically what Revit needs information wise to perform an array. First of all, they need the count. They need to know how many styles we want to array. We can do a formula for that. They need to know the divisible length, meaning, what's the space in which we're going to array in? And they need the array spacing, the actual increment between each items being arrayed. Before you get started in a project browser, let's go to the left elevation.
Let's make sure we are aligned to the correct phase. On the Modify tab click the Align button. Select the top reference plane and select the top of the style, and lock it. Let's go to the right elevation, let's zoom in here and let's do the same thing. Click Align, select this plane and select this item and lock it. Go to your 3D view, look around make sure everything looks okay. In a family this complex, you definitely want to make sure everything's in alignment, before you start throwing a lot of formulas in there. Or you'll find yourself going back and redoing some work. I'm going to hit Escape a couple times, and now let's create some parameters that's going to allow us to array this style multiple times to stop here, with the same exact spacing between all of them.
On the Properties panel, click the Family Types button. Let's start adding some parameters. Go ahead and click the Add button for parameter. The first parameter, we need to add style count. This must be an instance parameter. The type of parameter actually must be an integer. We have to have a whole number here. Group parameters under. Let's group these under Constraint, to keep them together. Let's click OK. Let's add another perimeter.
Let's call it erase spacing. Let's make it an instance parimeter. Type of parimeter can stay as length. Let's group it under constraints. So erase spacing. HIt OK. Add another parameter. Let's call it divisible length. Let's make it an instance parameter, and I'll group it under constraints again.
Let's click OK. Now we're going to add one more, we're going to call that max spacing. It's an instance parameter, its length and we're going to leave it under dimensions. We're going to hit OK. What's going to happen here is this, the user is going to type in what they want their spacing to be, this number is going to drive all these other numbers up here. So let's put a max spacing in now, let's just go one foot six and hit Enter. Let's hit Apply. Let's get started with the constraint parameters.
The first one we need is divisible length. Divisible length will be length minus Style width. Click Apply. Nine foot nine. The next one can be style count. Style count will be divisible length, divided by max spacing.
(audio playing) Click Apply. Now for the array spacing, that's divisible length divided by style count. (audio playing) Make sure it's upper lowercase. And click Apply. Our numbers are filling out. You can see, one parameter leads to another, leads to another, but they're all based on, this parameter right here. All right let's hit OK.
Let's go to our ref level floor plan. And we're going to array this, go ahead and select the style, on the modified panel. Let's click the Array button. Let's make sure its a linear array. We have to group and associate it for the number, let's just type in four for now. We're going to obviously change that with the perameter. We have to move it to second. What that means is we're going to array this, but the spacing is determined by the increment we have here.
So I'm going to pick a point here, and let's just come in maybe one foot six. And then hit Escape a couple times. Go ahead and select any one of these and come up here, and you'll see that you hover over the count. Go ahead and select this line. We can add a parameter to that. The parameter's going to be style count. That's the only parameter that it'll accept, so we're going to do that. They're not quite even yet, but that's okay, we're going to fix that. On the Measure panel click the Allign Dimension button, it forever wants you to save it's always a good idea to do it.
Click the midpoint of that style and the midpoint of that style, and pick a point down here and hit Escape. Now select this dimension. Let's add a label to that. And that's going to be array spacing. See that? I think we'd better test this live. Save it if you haven't saved it already. Let's start a new project. Let's go to the Tripple R > New > Project. Template file will be architectural. Let's hit OK.
Let's draw a wall. We'll put it right here. It doesn't have to be anything special. Now let's go to the south elevation. Hit Ctrl + Tab and hit Ctrl + Tab again. Now click Load Into Project. Okay. In Elevations, let's go to South Elevation again. On the Architecture tab, click Component.
Now Revit wants us to specify a work plane. That's fine. We're going to leave it on Pick Plane and hit OK. Come down to the wall. I want you to see the entire wall highlight, pick it. We're going to pick a corner here. We're going to come down, and we're going to pick a corner here. Go to a 3D view. And I think we're good. Let's test one more thing.
Go ahead and select the component. Let's see what happens if we change the max spacing to two feet. Spaced it out. Wow, that's a lot of parameters. You can see where if we slip up on one little thing, it could take a while to trace our steps.
- Creating a basic profile family
- Creating a door family
- In-place massing
- Working with complex families
- Using yes/no parameters and if statements