May 04, 2014

Revit - Residential Door Tag

There is a convention for residential projects in some areas using Imperial Units for showing the width and height of a Door at the plan representation of the Door, in the format "3070", where the "30" represents a width of 3'-0" and the "70" represents a height of 7'-0". Likewise, a 2'-10" wide by 6'-8" high door would be tagged as "21068". Sometimes the inches numbers are shown in a slight superscript, to make the values more legible.

Long-time readers may recall that Door Tags supporting this convention had been developed in AutoCAD® Architecture. The same can be done in Autodesk® Revit®, by adding some additional parameters to your Door families, and using some relatively simple formulas. The instructions below and screen captures are based on the 2014 release, but you should be able to follow them in other versions as well (tool locations and naming may vary). In order for these parameters to appear in a Door Tag, they will need to be created as shared parameters. This example assumes that your Door families have parameters called Width and Height that hold the (nominal) door opening width and height. If your Door families use differently named parameters for these values, then substitute your names for Width and Height. It also assumes that your nominal door sizes do not involve fractional inches.

We need to take the values from the Door's Width and Height parameters and extract the whole foot value and the whole inch value for both the width and the height, so that we can then create a Door Tag that combines these values. To do this, we will need to create six parameters.
  1. Edit one of your Door Families, and on the Create ribbon tab, on the Properties panel, select the Family Types tool to open the Family Types dialog.
  2. In the Family Types dialog, in the Parameters area at the middle of the right side, select the Add button.
  3. In the Parameter Properties dialog, in the Parameter Type area at the top, choose the Shared parameter radio button and then select the Select button.
  4. If the Shared Parameters dialog appears, select the Edit button. If a dialog appears indicating that you have not yet specified a shared parameters file, select OK.
  5. In the Edit Shared Parameters dialog, you will need to indicate a shared parameters file to use, if one has not previously been selected, or verify that the one that is selected is appropriate. Use the Browse button to open an existing file or the Create button to make a new one. CAUTION: If you work with others, and you are not the BIM Manager for your firm, please consult with the BIM Manager before creating a new shared parameters file or editing an existing one, to assure that you are using the correct file, not duplicating parameters that already exist, putting the parameters in the proper group and use the appropriate naming convention. For the purposes of this example, I created a new shared parameters file, just for these parameters. While you can have multiple shared parameters files, it is easier to manage shared parameters at a firm if they are all in a single file. Work all this out with your firm's management and/or your co-workers in advance, so that work will not need to be redone.
  6. With the proper shared parameters file selected, set (or create) the desired Parameter group. I used "Door" for this example; you may already have a similarly named group that should be used instead. (See discussion on coordinating with your BIM Manager above.)
  7. You can now use the New button in the Parameters area at the right side to create the six new shared parameters (unless you have existing ones that already perform the needed function). In the Parameter Properties dialog, enter WidthReal for the Name, set the Discipline to Common and set the Type of Parameter to Number. We will use this to convert the door's width from feet and inches to a real number (decimal feet).
  8. Select OK to return to the Edit Shared Parameters dialog.
  9. Using the New parameter button, create five additional shared parameters: HeightReal, WidthFeet, HeightFeet, WidthInches and HeightInches. All five should be set to the Common discipline. Height Real should also have a type of Number; the other four should have a type of Integer.
  10. With all six shared parameters created, select OK in the Edit Shared Parameters dialog.
  11. In the Shared Parameters dialog, set the appropriate Parameter group, if necessary, and then choose the WidthReal parameter and select OK.
  12. In the Parameter Properties dialog, set the Group under which you want to place this parameter. In the example, I used the General group, but you may feel that another group is more appropriate.
  13. Verify that the Type radio button is selected and select OK.
  14. Add the other five shared parameters by using the Add button and following the steps above, with the exception that you will not need to create the shared parameters, since all six were created at once.
  15. With the new parameters in place, you can add the formulas for them in the Family Types dialog. In the Formula column for the WidthReal parameter, type Width/1'. Dividing the value of the Width parameter by 1' removes the units from the value, leaving a real number (in decimal feet).
  16. In the Formula column for the HeightReal parameter, type Height/1'.
  17. In the Formula column for the WidthFeet parameter, type rounddown(WidthReal). This will round the value of the WidthReal parameter down to the next lowest whole number, which is the whole feet part of the Door width.
  18. In the Formula column for the HeightFeet parameter, type rounddown(HeightReal).
  19. In the Formula column for the WidthInches parameter, type rounddown(12.0*(WidthReal-WidthFeet)). This subtracts the whole foot value from the Door width, leaving fractional feet (if any), and then multiplies the result by 12 to arrive at the inches portion of the width. This value is rounded down to the next lowest whole number, discarding any fractional inches.
  20. In the Formula column for the HeightInches parameter, type rounddown(12.0*(HeightReal-HeightFeet)).
  21. You will see the calculated values for each of the parameters and can verify that the results are correct.
  22. If your Door family has multiple types with different sizes, you can select the different types to verify that the formulas work in each case.
You will need to add these parameters and formulas to each of the Door families on which you want to use a residential-type tag. Having added the parameters to your Door Families, you will need to create a Door Tag that displays them. Create a new Revit family, starting with the Door Tag.rft template.
  1. On the Create ribbon tab, on the Text panel, select the Label tool.
  2. Verify the current Label type is as desired. If not, set and/or create and set the appropriate Label type.
  3. On the Modify|Place Label contextual ribbon tab, on the Format panel, verify the Label justification settings are appropriate. For this example, I am using Align Center (left/right) and Center Middle (top/bottom).
  4. Select the placement point for the Label, keeping in mind that the initial insertion point of the tag will be at the intersection of the two Reference Planes. Do not obsess over picking the point, you can fine tune the placement after the Label is created.
  5. In the Edit Label dialog, select the Add Parameter button in the lower left corner of the dialog.
  6. In the Parameter Properties dialog, select the Select button in the Parameter Type area at the top of the dialog.
  7. In the Shared Parameters dialog, set the Parameter group to the one you used for the parameters you added to your Door Families ("Door" in the example here), and choose the WidthFeet parameter. If you do not see your parameter group or your parameter, use the Edit button and, in the Edit Shared parameters dialog that opens, browse to the shared parameter file that you previously used when creating the shared parameters for your Door Families. Then click OK to return to the Shared Parameters dialog and choose the WidthFeet parameter as directed.
  8. Click OK twice to add the parameter.
  9. Repeat the previous two steps to add the WidthInches, HeightFeet and HeightInches parameters.
  10. In the Edit Label dialog, select WidthFeet from the Category Parameters list on the left side of the dialog, and then select the Add parameter(s) to label button (with green arrow).
  11. In turn, do the same for the WidthInches, HeightFeet and HeightInches parameters. Add representative sample values, rather than the default, which is the name of the parameter. In my example, I set the Spaces between the parameters to 0 and did not add a Prefix or Suffix to any of the parameters. If your needs are different, set these values as you wish.
  12. Select OK to return to the Family Editor.
  13. Fine-tune the location of the label and adjust the label's width so that it is just wide enough to accomodate the widest expected value.
  14. Save the Door Tag family, and then load it into a project in which you have placed Doors that have the residential door parameters and formulas added. Tag the Doors with the new tag and verify that the parameters, formulas and tag are working as desired.
I have attached a ZIP file that has a sample Door Tag family as well as a sample project file in which the Door Tag is applied to a thread in the Autodesk Revit Architecture Discussion Group. The sample Door Tag family has two types: one displays the single label with all four parameters in it, as shown above, and the other uses four labels, one for each parameter, with the inches labels using a slightly smaller height and positioned as a superscript, similar to the AutoCAD Architecture tag developed by Matt Dillon (see link in second paragraph above).
Yes/No parameters control the visibility of the parameters in each type.

See "Part 2" to see how this concept can be applied to Curtain Wall Doors, also.