Creating Hatch Patterns for AutoCAD
The “acad.pat”
file contains the predefined hatching patterns used by AutoCAD. This file may be edited to add hatch patterns, supplemented, or replaced. All patterns start at the point 0,0, the pattern is calculated out to cover the hatching
boundary.
Pattern definitions
consist of the following fields:
A leading ‘*’
A name. The name
can have no spaces, punctuation marks, parenthesis, or slashes.
A description
The standard format for
hatch patterns is
<*><name><, description>
The name and the description
are separated by a coma.
Descriptions cannot
exceed the eighty character line length
After the introduction,
the subsequent lines define the hatch pattern with the format of:
Angle, X-orgin, Y-orgin, delta-X, delta-Y, [definition string]
The definition string
consists of varying length dashes denoted by positive numbers, spaces denoted
by negative numbers and dots denoted by “0”’s.
There is a maximum of six string definitions per line. All fields are comma delimited and terminated
with a carriage return.
An example
* square, a square pattern
0, 0,0, 0,1, 1,-1
90, 0,1, 0,1, 1,-1
or, a second example
*pgram, parallelogram pattern
0, 0,0, 1,1, 1,-1
45, 0,0, 0,1.4142, 1.4142,-1.4142
45, 0,1, 0,1.4142, 1.4142,-1.4142
How to use the newly created
pattern
Each pattern is created in its own file.
The file name must have the same as the pattern name. The file extension for hatch pattern is xx.pat
After writing each line
of code, the pattern should be loaded and checked to make sure that it is
performing as expected. Corrections of
multi-lined code become difficult and confusing.
To load custom designed Hatch
patterns
From the TOOLS pull-down
menu, click
On the DesignCenter toolbar, at the top
of the dialog box, click Search.
In the Search dialog
box, click the drop down arrow of the Look For box.
Choose the Hatch Pattern Files.
If known, change the directory to the specific location
of the file,
or BROWSE for the Drive
and sub-directories
On the Hatch Pattern Files tab, in the Search for the
Name box, enter *.
Pick “Search Now” to
find the file.
When
the search doesn’t find that pattern file. You know that pattern file is there. The
search didn’t find the file. You’re sure that
that pattern file is in the directory specified. The search still didn’t
find the file. How come the search doesn’t
find the pattern file?
HiNT:
enter the file name as <first letter of the file name> and then an “*”
i.e. e* for the pattern name “earth”.
By Double-clicking on
the appropriate hatch pattern file, the HATCH command will be
called and the chosen pattern will be loaded and ready to use.