0
0
SolidworksHow-ToBeginner · 4 min read

How to Create Custom Hatch Pattern in AutoCAD Easily

To create a custom hatch pattern in AutoCAD, you write a .pat file defining lines and angles using a specific syntax, then load it via the HATCH command. The pattern file contains line definitions with angles, spacing, and offsets to form the desired design.
📐

Syntax

A custom hatch pattern in AutoCAD is defined in a .pat file with this structure:

  • *PatternName, Description: Defines the pattern name and optional description.
  • Angle, X-origin, Y-origin, Delta-X, Delta-Y [, Dash lengths]: Defines each line in the pattern.

Each line specifies the angle of the hatch lines, the start point, spacing, and dash lengths for dashed lines.

plaintext
*MyPattern, Simple diagonal lines
45, 0, 0, 0.25, 0, 0.125,-0.125
135, 0, 0, 0.25, 0, 0.125,-0.125
💻

Example

This example creates a hatch pattern with two sets of diagonal lines crossing each other at 45 and 135 degrees, spaced 0.25 units apart with dashed lines.

Save this as MyPattern.pat and load it in AutoCAD using the HATCH command, then select 'Custom' and choose your pattern.

plaintext
*MyPattern, Cross diagonal dashed lines
45, 0, 0, 0.25, 0, 0.125,-0.125
135, 0, 0, 0.25, 0, 0.125,-0.125
Output
A hatch pattern with dashed diagonal lines crossing at 45° and 135°, spaced evenly.
⚠️

Common Pitfalls

  • Forgetting to save the pattern file with a .pat extension causes AutoCAD not to recognize it.
  • Incorrect spacing or offsets can cause overlapping or gaps in the hatch.
  • Not restarting AutoCAD or reloading the hatch patterns after adding a new .pat file.
  • Using angles outside 0-180 degrees or incorrect dash lengths leads to unexpected patterns.

Always test your pattern on a small area before applying it broadly.

plaintext
Wrong:
*BadPattern, No spacing
0, 0, 0, 0, 0

Right:
*GoodPattern, Horizontal lines spaced 0.2
0, 0, 0, 0.2, 0
📊

Quick Reference

ElementDescriptionExample
*PatternName, DescriptionDefines pattern name and description*MyPattern, Diagonal lines
AngleLine angle in degrees (0-180)45
X-origin, Y-originStart point coordinates0, 0
Delta-X, Delta-YSpacing between lines0.25, 0
Dash lengthsLengths of dashes and gaps (optional)0.125,-0.125

Key Takeaways

Create a .pat file with line definitions to make custom hatch patterns.
Use angles, spacing, and dash lengths to control the pattern design.
Save the file with .pat extension and load it via the HATCH command.
Test patterns on small areas to avoid spacing or overlap issues.
Reload AutoCAD or the hatch patterns after adding new .pat files.