Issues creating a new hatch type on PAT file

Issues creating a new hatch type on PAT file

Anonymous
Not applicable
4,486 Views
9 Replies
Message 1 of 10

Issues creating a new hatch type on PAT file

Anonymous
Not applicable

Hi,

 

Please, is there any tutorial / forum where I may learn more about it? Because it is ridiculously difficult to understand what each of those columns represent!

 

first one = angle

second and third = coordinate

fourth and fifth = as far as I understood, it is the variation on X and Y

sixth and seventh = pen down & pen up (line, space)

 

In theory, it is pretty simple, but when you start working on it, the result gets all messed up!

 

For instace, I've been trying to create a tile pattern with a 30x60 tile right next to another 30x60, so I tried:

 

0, 0, 0, 30, 60

0, 0, 0, 60, 30

90, 0, 0, 0, 60

90, 60, 0, 0, 60

 

But that didn't work. Then I started trying to use those detals and it got really ugly.

 

Anyway, if anyone can help me that would be very appreciated!

 

Thanks,

0 Likes
4,487 Views
9 Replies
Replies (9)
Message 2 of 10

ToanDN
Consultant
Consultant

Do yourself a favor and use pyRevit or HatchKit addin to create custom patterns.

 

Annotation 2018-11-11 150955.png

0 Likes
Message 3 of 10

barthbradley
Consultant
Consultant

Creating hatch patterns is brain-pain, even for the best of us. It's almost as bad as writing algebraic equations.  That's why I usually Google for it first.  Amazing how many hatch patterns I've found on line - and for free - after struggling for hours to write the pattern myself.  Another great "cheat" is Hatchkit.  Look it up.  The nominal investment may be worth your while.

0 Likes
Message 4 of 10

Corsten.Au
Advisor
Advisor

To start with... you need to mention units, type ...checkout some existing pat file and 

you can understand requirement...


;%UNITS=MM
;%TYPE=MODEL

 

;%UNITS=INCH
;%TYPE=DRAFTING

 

 

Read this out to get some basics right if you want to edit pat files and 

customize it for Revit

 

; 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:
;
; ;%VERSION=3.0
;
; 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
; ;%UNITS=MM
;
; 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
; ;%TYPE=MODEL
;
; 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
;
; ;%UNITS=INCH
; ;%VERSION=3.0
;
; *Block 8x16, 8 x 16 blocks running bond
; ;%TYPE=MODEL
; 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.

Corsten
Building Designer
0 Likes
Message 5 of 10

barthbradley
Consultant
Consultant

Your pattern works. I think all you need to do is change your Import Scale

 

 

XYZ2.pngXYZ.png

 

p.s. this can be done with just 2 lines of code, or directly from within Revit.  It's a simple cross-hatch. FWIW.  

Message 6 of 10

hugha
Collaborator
Collaborator

Perhaps with those dimensions it's meant to be a MODEL pattern?

Here's one made from unbroken lines


;%VERSION=3.0

;%UNITS=INCHES

*30wx60h tiles
;%TYPE=MODEL

0, 0, 0, 0, 60

90, 0, 0, 0, 30

 

The free HatchKit Add-In for Revit can create patterns consisting of any number of sets of parallel unbroken lines.

 

hth,

 

Hugh Adamson

www.hatchkit.com.au

 

 

0 Likes
Message 7 of 10

Anonymous
Not applicable

Hi,

 

So you made 3 lines using 2? I'm not sure I followed. Because as far as I understood from those PAT standards, there should be 2 vertical lines and 1 horizontal.

 

Please let me know what you think,

 

0 Likes
Message 8 of 10

hugha
Collaborator
Collaborator

You asked:

>For instace, I've been trying to create a tile pattern with a 30x60 tile right next to another 30x60 ...

 

which to me describes tiles lined up both vertically and horizontally as shown in the reply preceding my own.

Such arrangements require one set of unbroken horizontal lines and one set vertical.

 

If that is not the case, please post a sketch of the desired arrangement.

 

Hugh Adamson

www.hatchkit.com.au

0 Likes
Message 9 of 10

Anonymous
Not applicable

Hi,

 

Please find below a sketch from the pattern I'm trying to create (30x60in x 60x60in CT), replicated linearly and having all tiles lined up, not alternate.

 

Regards,

0 Likes
Message 10 of 10

hugha
Collaborator
Collaborator

try this:

 

;%VERSION=3.0

;%UNITS=INCHES

*30w60h60w60h tiles
;%TYPE=MODEL

0, 0, 0, 0, 60

90, 0, 0, 0, 90

90,30, 0, 0, 90

 

hth,

Hugh Adamson

www.hatchkit.com.au

 

0 Likes