From the course: Revit: Parametric Curvature in the Family Editor

Controlling rotation - Revit Tutorial

From the course: Revit: Parametric Curvature in the Family Editor

Start my 1-month free trial

Controlling rotation

- [Instructor] Let's step away from parametric curvature for a moment and talk a little bit about rotation. Now, rotation and curvature are obviously not the same thing but there's some related concepts and they're often used together. So, in many of the families that you'll create that require parametric curvature, you'll also find a need for parametric rotation and vice versa, so it's useful to have some techniques to be able to control both things. So, we certainly will get back to several examples of curvature but for now, let's just take a little bit of time here and look at the most common way to control rotation in the family editor. So, I'm back in my seed family here and what I'm going to do is just delete the 3D box. I'm going to stretch the size of the plan view up a little bit, zoom in just a touch, so that we can get a better look and the way that we're going to control rotation is not by assigning rotation to reference planes. Reference planes are really useful for controlling linear dimensions and other kinds of relationships but even though reference planes seem to have these endpoints right here, technically, they're really infinite planes. So, that makes it very challenging to control rotation in a stable and reliable way because there really isn't anything that we can kind of pin down as the axis of rotation when using a reference plane. So, instead what we're going to do is go to the create tab and here on the datum panel, we're going to use a reference line. Now, if you look at the draw toolbox, you'll see that we've got all the same shapes that we would have with model lines. So, reference lines and model lines are actually somewhat similar to one another. For controlling rotation, we just need a single line segment. So, the default line tool is all that we need. What I want to do is make sure that I'm snapping my first point directly to the intersection of these two reference planes. Then I want to start moving at some particular angle. Now, you can go at any angle you like. I usually like to go at 45. There's nothing special about 45 but that's just my good default, sort of fallback angle that I like to use. Now, notice that there is a bold dimension indicating the length of the reference line. You can type a value right into that bold dimension. Revit calls those listening dimensions and when you see those, you're able to type right in and press enter. So, if I come over here and click modify to cancel, we now have a reference line that's exactly five units long. It's snapped to this intersection and you could see the automatic sketch dimensions kicked in at zero and zero and then over on this end, because there was no reference planes nearby, it just measured those to the nearest available reference plane. Now, that nearest available reference plane is going to come back a little bit later, so we're going to talk more about that shortly. Let's deal with this end first, though. What I want to do over here is just simply use my align tool and align and lock that endpoint to the intersection of those two reference planes. So, if I set the vertical reference plane as my alignment edge, notice that you can move your mouse near the endpoint of the reference line and a little blue dot will appear at the endpoint. Now, make sure you're getting that blue dot and not the reference line itself. If you click the reference line itself, it'll actually rotate the reference line, it'll go vertical and will kind of miss the opportunity to lock the endpoint. So, I'm going to do control-Z to undo that. What we want to do is do the reference plane and then the little blue dot. Now, notice that actually what it's got here is the automatic sketch dimension, not the blue dot, even though it looks like the blue dot is there. So, I'm going to have to press tab once, twice, until I get to just the blue dot, click it, and what I want is the ability to lock it. So, if you just do this and then click where it looks like you're getting the blue dot, it didn't actually do anything. So, you've got to do reference plane, tab a couple times, blue dot, and then lock it. And notice that both of the automatic sketch dimensions disappear, so we've now locked that endpoint to that intersection. And you can test that out by just sort of grabbing the other end and dragging this around and notice that you're free to drag it wherever you want it to go. Now, I'm going to do control-Z one time, to put it back to the five unit length and make sure that it's still locked at the end of there. Now, let's look at the five unit length. If you want, you can make that a parameter as well. Now, that's actually going to help with a few of these automatic sketch dimensions also. Notice that the temporary dimension appears for five and again, that only appears while it's selected, so if you deselect, it goes away, but then you select it again and it reappears. Well, right there, is that make this temporary dimension permanent icon. Let's click it and now if you click away, you still have the dimension. Now, even though this is at an angle, this is still a linear dimension, which means that you can apply a linear parameter to that dimension. So, I'm going to come up here and click create parameter and I'll call this L and click okay. Now, notice also, that the automatic sketch dimension over here has disappeared, so we still have one right there but we've lost one of them over here. So, by creating this parameter, we've eliminated the need for one more automatic sketch dimension. Now I'm going to pan this over slightly just to give myself a little bit more room and then I'm going to go to family types here and we're going to flex this value. So, let's try a value of maybe six, something a little bit larger. Now, what you probably are expecting to happen, is that this line will get longer out this way and maintain the 45 degrees but in fact, when I click apply, notice that that's not the case. This automatic sketch dimension is behaving like a constraint and so it's keeping that value and therefore, the result was it had to rotate the reference line. Okay, no other choice. Now, you can try lots of other values in here. I can do a value smaller than where we started and it'll just rotate it again, continuing to maintain that parameter. So, you could try as many values as you want but at some point, you'll hit a value that won't work. Like for example, if we try one, that will generate a warning and say the constraints are not satisfied. There's no way to set the length of this at one and keep that distance. So, we're not able to use that value and that's one of the limitations of trying to flex this and keeping the automatic sketch dimension. So, why don't we reset it back to five, put it back to 45 degrees, and see what other option we have available. Well, you would expect it to go back to 45 degrees but check this out, when I click apply, look what happens. So, you remember earlier, I said that the automatic sketch dimensions were coming in over here, based on the closest available reference plane? Once you've rotated that line below the horizontal reference plane, it's now the closest available reference plane and automatic sketch dimensions are actually recalculating each time and now it found a closer reference plane and it said, oh, okay, I'm going to associate it with this. It's one more reason why I always try to eliminate as many of these as possible, because that behavior is going to make this thing behave completely unpredictably. All right? So, let me okay out of there and let's look at what we want to do next. We said we wanted to control rotation in this video, right? So, why don't we go back to that original goal? So, over here on the drop-down for dimensions, I'm going to choose an angular dimension and I'll pick the horizontal reference plane and the reference line and then place my dimension over here. The minute I place that dimension, that eliminates the final automatic sketch dimension. So, at this point, we've eliminated all of the automatic sketch dimensions, so now all that remains is creating a parameter for this angular dimension and you do that the same way as we do all the other parameters, just select that dimension, add a parameter, give it a name. I'm going to call this one just angle A. Sometimes it'll jump over here. You can adjust the position of that if you want to. It doesn't really matter where it is, but now let's go back to family types and flex it, to see if it's working. So, I'm going to try 20 degrees. Let's try 75. Let's try 10. Looks like it's behaving pretty well. What about the length? Let's try three units and notice that I'm able to change the length independently of the angle. Now, this was not the case when automatic sketch dimensions were controlling it. The two were kind of linked but now, because of the way we've set it up, you have independent control over both the length of the line and the angle of the line and so now what we've created is a much more stable and reliable rig, that we can use going forward to create other families. So, in the next video, we're going to take this and use it to create a parametric door swing.

Contents