Families – constraints

Constraining lies at the heart of parametric families. There are 5 tools that Revit has to let you constrain a family.

  1. Locked geometry and linework.
  2. Locked dimensions.
  3. Equal dimensions.
  4. Parametric dimensions (type and instance).
  5. Automatic sketch dimensions.

The first 4 items are pretty well covered in tutorials so I’m not going to go into any great detail on these. I just wanted to touch on a couple points I haven’t seen in a tutorial yet.

Geometry and linework should always be locked to a reference plane or line and then the reference plane or line should be adjusted with labelled parameters. This will make your family more stable and predictable when flexed.

Locking an equal dimension has the effect of double constraining. Not only will the constrained object maintain its position equally but it’s length will be fixed as well.

Locking a parametric dimension will “maintain the parametric relationships between labeled dimensions“. Huh? This one really needs an example to make sense.

Figure 1.

In figure 1 above, the black dashed line is constrained by 2 labelled dimensions which are using the same parameter “test1”. The horizontal dimension constrains the length of the line while the vertical dimension controls the lines position relative to the horizontal reference plane (shown in green). If I were to move the dashed line line up or down, the default action of Revit is to change the value of the test1 parameter to the new distance between the horizontal reference plane and the dashed line and as a result the length of the dashed line would change to match this value (since it is labelled with the same parameter). However, if I lock one of the dimensions (it doesn’t matter which) all the dimension labelled with the same parameter will become locked as well. Which means if I attempt to move the dashed line up or down, Revit will will issue a constraints not satisfied error when it attempts to change the length of the line to the new value (because it is locked).

Automatic sketch dimensions (autodims) are hardly mentioned in most Revit blogs, tutorials and documentation I’ve read and are hidden in the Revit family editor by default. Surprising really because these are really the guts of how Revit constrains a family when flexed.

Important note: Temporary dimensions are not the same as automatic dimensions. Temporary dimensions appear when you select an object in Revit, autodims remain visible unless specifically turned off. In figure 2 below, the black line is not selected.

As I mentioned autodims are hidden in the Revit family editor by default. This is because every time you create a line or geometry the autodims are automatically created for it and after a while your screen can become quite unreadable. To make the autodims visible here’s what you need to do:

  1. In the “Visibility/Graphic Overrides”, go to the “Annotation Categories” tab and click the check box next to “Automatic Sketch Dimensions”. It is a sub category under “Dimensions”.
  2. Draw a reference plane to constrain with a labelled dimension, in figure 2 below I drew a reference plane and labelled it with the test1 parameter (type or instance doesn’t matter). At least one labelled dimension is required otherwise you can’t flex the family and therefore autodims wouldn’t be required.
  3. Draw a line (symbolic or model) and you will notice that blue dimensions automatically appear on the screen. These are the autodims and they are telling you how that line will behave when the model is flexed.

Figure 2

Without the autodims showing it would be easy to think that the black line in figure 2 would not be affected in any way if the parameter test1 was changed. However that autodims show us quickly how it will be changed. On the left side, there is a horizontal autodim connected to the left vertical reference plane (shown in green) and on the right side is another autodim connected to the other vertical reference plane. These autodims act as locked dimensions, so when test1 is set to 5′-0″ the end points of the lines will be adjusted to maintain the value of the autodims. This will change the length AND angle of the black line, see figure 3 below.

Figure 3

There is a way to change the behavior of autodims. Like normal dimensions theĀ  witness lines can be edited so that the autodims connect to other objects. This is dangerous however because even though an autodim acts like a locked dimension you can still adjust the end point of the line without getting an error. Revit just creates new autodims when the line is manually adjusted and any changes you made to the witness lines of the autodims are lost.

Autodims (being automatic) will self adjust as required in the family editor. When you manually adjust the shape or location of a geometric shape or line the autodims will adjust too. Also if you create a labelled or locked dimension the autodims will also adjust, in this case some might completely disappear if they are over constraining the family.

One last note, autodims of 0′-0″ means the end point of the line is sitting directly over something and will move with it.

Conclusion

Just a few more handy tips when creating families.

  • When the work plane is based on a reference plane (not a face), the centre of a circle will autolock to 2 intersecting ref planes. This is handy for creating things like table legs and it works when copying too.
  • When an instance parameter is used between two reference planes, Revit will draw arrows (when the family is used in a project) that the user can drag with a mouse to adjust the distance. No need to go to the properties palette.
  • Parameters can also based on formulas (similar to formulas in spreadsheets). For example, a parameter can be set to equal the sum of two other parameters or even be set to a certain value if another parameter is greater than a another parameter. This topic is rather lengthy however and I won’t post on it unless asked too. There is information in the Revit documentation on this.

Thanks for reading, see you soon. Feel free to ask questions in the comment area below.

Comments are closed.

Revit and Building Information Modeling