Thursday, May 27, 2010

To create custom patterns to use in Revit you'll need a very specialized tool: A text editor! (Like Notepad, or better Notepad++) With this you can create a .pat file that contains you pattern(s).

To explain how to set this up I have copied the explanation out of the Revit.pat-file stored in the program installation map of your Revit.

;;revit.pat file v. 3.0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;(c) 2000-2003 Autodesk Revit ;;;

This file contains the standard set of custom fill patterns distributed with Autodesk Revit. Since it is part of the standard installation, do not change it. Any changes you make may be lost when you update Revit. To define custom patterns, create a new file using this file as a template.

Fill patterns are also known as hatches and fills.

;;Model vs. Drafting patterns

There are two types of fill patterns in Revit: model and drafting. Model patterns are used to depict real-world elements, such as bricks, shingles, tiles, etc. They are defined and display in model units. An 8x16 inch brick pattern will show exactly 12 courses on an 8-foot-tall wall. A 2-meter-tall wall with a 200x400 mm brick pattern will have 10 courses. Model patterns appear denser at coarser view scales and sparser at finer ones.

Drafting patterns are defined in paper units. If you import the pattern at scale 1 and print at 100% zoom, the pattern's dimensions on paper will be exactly as specified in the file, regardless of view scale. Drafting patterns are used to symbolically denote materials such as steel, concrete, sand, etc.

Drafting patterns are typically defined with smaller numbers than model patterns. Drafting patterns usually contain sizes from 0.04 to 1 inch (1 - 25 mm)model patterns usually contain sizes from 2 to 20 inches (50 - 500 mm). These are guidelines only, not enforced by Revit. Revit's existing restrictions limit the maximum size and density of the patterns, and a review of these restrictions is planned for a future release.

;;Pattern files

Revit pattern files contain custom fill pattern definitions. They are modeled after the AutoCAD hatch pattern files, with a few additions. The file extension is .pat. A file may contain an arbitrary number of patterns. To use the patterns, import the file using the Fill Patterns dialog. See Help for detailed instructions.

If a pattern file contains an error, Revit will not import it. An error message will indicate the erroneous line. Revit may consider a pattern to be too large or too dense. If it does, modify the import scale or the pattern definition. Once a pattern is imported, it is stored in the project, independent of the original file.

;;Pattern file format

All lines must be less than 4096 characters long. Lines beginning with ;% are Revit directives. Lines beginning with are comments. Lines beginning with * begin new pattern definitions. Blank lines are ignored.

The file consists of a prologue followed by pattern definitions. The prologue may contain the following directives:


This identifies the file as a Revit Fill Pattern file of the specified version. The version described here is 3.0. Include this directive in your files for future compatibility.

   ;%UNITS=INCH          or

This describes the units in which patterns are defined. Specifying units in the file is preferred to modifying the import scale. If neither directive is present, Revit will assume that the patterns are defined in inches.

;;Pattern definition format

A pattern definition consists of the name header, type directive and line families. Each one is placed on a separate line. The entire pattern is terminated by the following header or the end of the file.

;;Header format

   *name, comment

The name may contain any ASCII characters except for comma. They are shown in the list of imported patterns. The comma and comment are optional. They are ignored by Revit. The header may be followed by one of the following type directives:

   ;%TYPE=DRAFTING    or

If neither directive is present, Revit assumes that it is a drafting pattern.

;;Line families

Each line family is a set of parallel lines that build one "direction" of a pattern. A complete pattern may be defined by several families each defining part of the final, such as the vertical joints of brick coursing. The lines are described in the two dimensions of a face as follows:

   angle, x-origin, y-origin, shift, offset, dash, space, dash, space ...

Angle specifies the direction, in degrees, of a set of lines relative to the x-axis. The first line in the set starts at the specified x,y-origin. Parallel lines are drawn as specified by Offset and Shift to fill the entire face. Offset defines the distance between parallel lines. Zero Offset is not allowed. Shift moves the pattern of dashes and spaces along the length of each new parallel line. Shift is ignored if the line is solid. Distances are expressed as decimal numbers (using peroid as the decimal separator) in the units previously specified.

The dash-space sequence defines a repeating pattern of dashes and spaces for a line. If it is omitted, the line is solid. Positive numbers define dashes, negative numbers define spaces, and zero specifies a dot. If you begin a pattern with a space, do not alternate dashes and spaces, or do not end with a space, Revit will introduce tiny dashes or spaces to compensate. Revit expands dots and very short dashes into dashes of a minimum size.

;;Worked example


   *Block 8x16,  8 x 16 blocks running bond
   0,             0,             0,             0,             8
   90,            0,             0,             8,             8,             8,             -8

This pattern is called "Block 8x16" you will see this name when you import it into Revit. It is a model pattern. It has two families of lines. The first family creates the horizontal coursing:

   angle = 0          => lines are horizontal
   x,y-origin = 0,0
   shift = 0          => line pattern is not shifted
   offset = 8         => consecutive lines are 8 model inches apart
   no line pattern    => the line is solid.

The second family creates the vertical joints:

   angle = 90         => lines are vertical
   x,y-origin = 0,0   => the pattern begins at the same point as the horizontals
   shift = 8          => line pattern is is shifted by 8 model inches for consecutive lines
   offset = 8         => consecutive lines are 8 model inches apart
   dash = 8           => each line is built of 8" dashes and 8" spaces
   space = 8          => this pattern repeats until the face boundary

The shift makes the vertical segments appear between alternating pairs of horizontal lines, which appears as 16 inch bricks in interlocking bond.

;;Differences from AutoCAD
  • AutoCAD has an 80-character line size limit, Revit's is 4096.
  • AutoCAD allows arbitrary sequences of dashes, spaces and dots, Revit coerces them into dash- space format by inserting zero spaces and dashes.
  • AutoCAD has a notion of dots, Revit expands them (including the zero dashes it inserted) into short dashes.
  • AutoCAD has a maximum of 6 components to a line pattern, Revit has no limit.
  • AutoCAD does not allow spaces in a pattern name, Revit does.
  • AutoCAD allows only one pattern per a custom file, with pattern name matching file name, and with the file residing in a known location. Revit has none of these restrictions.
  • AutoCAD and Revit utilize different logic to decide whether a pattern is acceptable.
Note that when Revit exports its models into AutoCAD formats, such as DWG, it makes sure to comply with the more stringent AutoCAD requirements.

I find this explanation very clear. But in the end, to properly find out houw things work, you'll have to get your hands dirty and just go for try-and-error. That's what I did...

1 Comment:

  1. Erica said...
    Great explanation, but how do you set a start point for the hatch? Seems like the hatch is just centered in my region.

Post a Comment