Free Revit Tutorials Revit Family Creation

How to Create Parametric Array Family in Revit

parametric-array-revit
Written by revittutorials

In this Revit tutorial, we’ll take a look at parametric arrays in Revit families and how to lock them, constrain them, and also set some custom parameters to them. Specifically, we’re going to start with four things.

We’re going to start with a profile family, a generic model family, a curtain panel family, and then we’re going to load that into a project with just a sample curtain wall as shown here.

To start, snap some lines to what I’ve already kind of set up. I’m gonna lock a line to each side of this so that it flexes with a width parameter and a depth parameter. I’m just using the trim command there to flush it all up. And just to test it, looks like it’s working okay and this is what we are going to make a louver out of so I’m just making as a profile family in case I want to come back and change it later.

So once I’m done I’m going to load it into our louver generic model family and we’re just going to create a basic sweep that then hosts that profile family that we just made.  I’m going to snap a sweep line to that middle reference line there, constrain its ends, and then once I complete the sketch I’m going to grab a profile, the one that I just made, and load it in.

Navigate to 3D make sure it looks good, press ok, and then just associate a couple of parameters to type parameters within the family. I’m assigning a material to it, and then I’m also going to associate the angle parameter of that sweep to a parameter called rotation. Now once we have that, let’s just test out those couple of parameters just to make sure that it is actually working. Looks like the angle is working pretty well and then let’s just adjust the length to make sure it’s moving.

One more thing, we need to map the parameters from the profile family we just created. Just the depth and the width so that we can control them through the parent family that these eventually live in. And then we’ll load that into the curtain panel. So this is where we get into arraying what we’ve just created. I’m gonna lock it in the X and y-axis and then I’m going to navigate to – actually, first let’s do it what we just did, associate each parameter from that nested family to this parent family so that we can control it through here. Just a few of them and we’re good to go!

Next, I actually I need to add a reporting parameter to the width since it’s a curtain panel, it’s controlled by whatever it’s hosted in in the project. So we’re gonna make that reporting so it just it shows up with whatever that is and I got to give it a unique name here, so just call it panel width. Now that we have that, let’s lock this in the z-axis.

But first we need to create a couple of reference planes that are going to be kind of the start and finish of the array, and obviously since the louver has a width to it when it’s open, we don’t want that to be at the very bottom in the very top we want that to have an offset. So I’m going to call that array offset. And this offset is actually going to report to just half the width of that louver, I’ll show you in a second.

So if you look what we have here, I’ll just clean a couple of things up. Our length parameter should probably be an instance since it’s going to refer to a reporting parameter, really all of these should probably be instance parameters. So let’s just start with that, and then go to an elevation view where we’re going to, again, assign a reporting parameter to the height now so that we can use that in some of our upcoming formulas.

So now let’s go ahead and edit a couple of these names here so it makes more sense later on. That width parameter, we’re gonna make that louver width so I know what I’m talking about. And then the depths, let’s just do the same thing. And then refer to that in the formula. So the array offset is just going to be half the louver width. Click okay, we can always come back to that.

Now we need to host the louver on that offset plane. It looks like it’s not letting me snap to it, so let’s just kind of move it out of the way to see if we can snap it. So I did forget something, so let’s dive back into that family and check this out. We’re actually going to have to change that reference plane from not a reference to strong reference that we can actually snap to it when trying to lock a piece of geometry. So now that we’ve done that, we should grab the center point, there we go!

Now I’m going to use the array to and array last, make sure you select the last, just to put it off to the side just so we can kind of snap it into place. It’s never a good idea to put it in place at first, because you want to make sure you lock it to where you want it. We only need to lock the last one in the array. So I’m going to lock it to its center first and all the ones in between will follow. Lock it to this, the front/back reference plane, and then also lock it to that top array offset.

Now that we have that, we can specify a parameter for the number of louvers that are happening in that array. We’ll call that louver count. So the louver count is going to – It’s going to reference instance parameters in its formula so we’re going to make it an instance parameter and it’s going to be panel height minus double the array offset.

If these were all closed, they should all line up perfectly from the bottom to the top. So it looks like it’s not letting me use the panel height in here because it’s not referencing out-of-the-box geometry in Revit, and I’ve done this before so I know that you have to grab the actual reference plane at the base rather than the reference level when you’re assigning a reporting parameter in this family.

So, let’s go ahead and copy and paste that formula back in there and it should work.

First, let’s test that parameter just to make sure it’s actually working, but then we’re gonna have it report to a few other parameters in its formula. Looks like that’s all good to go.

Now let’s just make a regular rotation parameter which the user will actually be able to edit. Then a couple of more just kind of presets for the rotation if we want it open, then the louvers will be at a perpendicular angle to the – well actually, a parallel angle to the the ground floor. And if we want it closed, they should be completely closed, all vertical facing upwards. So then for a formula, we’ll just do, if it’s open make that constraint parameter zero, if it’s closed then we’ll make that 90, and otherwise just whatever the user specifies in the rotation parameter. So just to test all this out, let’s close it. Nice!

And then, let’s test the actual rotation parameter too. So it looks like our rotation constraint parameters is reporting kind of what we want. But, if you zoom in it looks like we’re slightly off. That’s because the array spacing would never actually equal the number of pieces arrayed, it would always be plus one. It worked” Just kind of mess around with that if you’re if you’re not too sure what I mean, but now that we have that set up let’s go ahead and kind of test it again. But, let’s also test some of the other parameters that define this too, so since it’s all reporting to the louver width this should change the count and the spacing just like that. So you can get a number of iterations done pretty quickly with just the simple family that we created in about 10 minutes or so. Now that we have all that, here’s kind of a before and after. I just cleaned up all the parameters, I’m adding some constraints, we can add extra functionality to this to constrain the user from like entering something that’s going to break it. So I’m just going to say if the rotation input is less than zero, make it zero, if it’s greater than ninety, keep it at 90, and if not then whatever they specify in between.

So now that we have four specified I can just start messing with everything that we just built in, changing the rotation, louver depth, louver width, whether I want it closed or not. And you can get just an infinite variety of shapes and spacing and sizes so this can be applied to a number of different things as you’re creating content Revit. I hope that was helpful and I appreciate you guys watching. Tune in next time! Thanks everyone.