How to

How to add new hatch pattern in AutoCAD?

Adding new Hatch patterns to AutoCAD lets you customize fills for materials, textures, and graphic styles. This guide explains, step by step, how to create or import custom hatch patterns (.PAT), how to load them into AutoCAD, alternative methods, common errors and fixes, and practical tips to avoid problems.


Introduction

AutoCAD reads hatch patterns from .PAT files. You can either edit the default PAT file (for example acad.pat) to add your own patterns or place a separate .PAT file in a support folder and load it when needed. Creating your own pattern gives you complete control over line angles, spacing, and repeating geometry.


Step-by-step: Create and add a custom Hatch pattern

1. Locate the AutoCAD Support folder

  • The typical path is something like C:\Program Files\Autodesk\AutoCAD [version]\Support.
  • You can also find or add support folders in AutoCAD: enter OPTIONS → Files tab → Support File Search Path.
Read Also:  How to display measurements in AutoCAD?

2. Back up the original file

  • Before editing, make a backup of acad.pat (or any .PAT you plan to change). This prevents accidental loss of stock patterns.

3. Create or edit a .PAT file

  • Open the .PAT file in a plain text editor (Notepad, Notepad++).
  • Add a new pattern definition at the end of the file. Pattern sections start with *Name, Description.
  • Basic .PAT format (simplified): the first line defines the name and description. Subsequent lines define the pattern geometry.

Example pattern (very simple diagonal line hatch):

*MYDIAG, Simple 45-degree diagonal lines
45, 0,0, 0.25,-0.25, 0.25

  • Explanation:
    • *MYDIAG — pattern name (must start with *).
    • Next text — description.
    • 45 — angle in degrees.
    • 0,0 — base origin (X,Y).
    • 0.25,-0.25 — the pattern step/delta values that define the repeating offset.
    • 0.25 — dash length(s) and spacing entries (simple example).

Note: The .PAT file syntax supports multiple offsets and dash/space entries per line. For complex patterns, follow AutoCAD’s PAT format rules or use a PAT editor.

4. Save the .PAT file

  • save changes. If you edited acad.pat, keep the backup copy safe.

5. Place or add the PAT file to a support folder

  • If you created a separate .PAT file, copy it to a folder listed in AutoCAD’s Support File Search Path, or add the folder to that list.

6. Load the pattern inside AutoCAD

  • Run the HATCH command (or BHATCH in older versions).
  • In the Pattern dropdown, choose Custom (or click Load). Browse to your .PAT file and select the pattern name.
  • If the pattern doesn’t appear immediately, restart AutoCAD (sometimes required).

7. Test your pattern

  • Create a small rectangle and apply the hatch with different scale and angle values to ensure it looks correct.

Alternative methods

Use a pre-existing .PAT file

  • Many free or paid pattern libraries exist online. Download the .PAT file and place it in your support folder or load it via the HATCH dialog.
Read Also:  How to check unit of measurement in AutoCAD?

Use third-party pattern editors or generators

  • Tools and web-based editors let you visually create a pattern and export a .PAT file. This avoids manual syntax errors.

Simulate a hatch using blocks/arrays

  • If a true hatch pattern is not suitable, create a repeated block and use ARRAY (rectangular/polar) to fill an area. This is heavier on geometry but can replicate complex symbols.

Use AutoLISP or plugins

  • Some plugins convert block patterns into hatch-like fills or provide more advanced pattern controls. Use vetted add-ons for production workflows.

Common errors and fixes

  • Pattern not listed in HATCH dialog

    • Fix: Ensure the .PAT file is in a folder listed in Support File Search Path. Restart AutoCAD if needed.
  • Hatch fails to apply or shows syntax error

    • Fix: Check .PAT syntax—first line must begin with *Name. Ensure numeric entries are correct and lines are not truncated. Use a PAT editor or compare to a working pattern.
  • Pattern is too small or too large

    • Fix: Adjust the hatch Scale in the HATCH command. You can also change the pattern’s step values in the .PAT file.
  • Pattern is offset or shifted

    • Fix: Modify the pattern origin values (basepoint) in the .PAT file, or set the hatch Pick Points/origin correctly when creating the hatch.
  • Pattern appears stretched or skewed

    • Fix: Verify angles and ensure drawing units match the pattern assumptions (paper units vs drawing units). Check the scale factor and any annotation scale settings.
  • Duplicate pattern name conflicts

    • Fix: Use a unique name (prefix with your initials or company code) to avoid conflicts with existing patterns.
  • Pattern renders slowly or causes performance issues

    • Fix: Simplify the pattern (fewer segments) or use block arrays for very complex symbol repeats.
  • Cannot save edits to acad.pat

    • Fix: You may need administrator rights to save in Program Files. Save the file to a writable folder and point AutoCAD to that folder via Support File Search Path.
Read Also:  How to convert recent AutoCAD file in lower version?

Tips and best practices

  • Always backup original .PAT files before editing.
  • Keep custom patterns in a separate folder and add that folder to AutoCAD’s Support File Search Path so patterns persist across updates.
  • Use a descriptive and unique name for your pattern (e.g., *ACME_CONC_HATCH).
  • Test patterns at multiple scales and angles using a small test rectangle.
  • Comment your .PAT file header with author, date, and usage notes for team members.
  • Use a PAT editor or generator to reduce syntax mistakes.
  • If sharing with a team, include the .PAT file and update the team’s support path or use a shared network path.
  • Version-control your pattern files (simple Git or shared folder) to track changes.

FAQ

How do I make a custom pattern available only in one drawing?

Create or keep the .PAT file in the same folder as that drawing and do not add that folder to AutoCAD’s global Support File Search Path. Alternatively, load the pattern in the drawing and share the .PAT file alongside the DWG when distributing.

Can I convert a block or symbol to a hatch pattern?

AutoCAD does not natively convert block geometry directly into a .PAT hatch. You can replicate the effect using arrayed blocks or use third-party tools or scripts that convert repeated geometry into a hatch-like pattern.

Why does my custom hatch look different between computers?

Differences are usually caused by missing .PAT files, different Support File Search Paths, different drawing units/scale, or missing font/linetype resources. Ensure all users have the same .PAT file in their support paths and consistent drawing units.

How do I share custom hatches with my team?

Place the .PAT file on a shared network folder and add that folder to each user’s Support File Search Path, or distribute the .PAT file and instruct users where to place it locally.

Do I need admin rights to add patterns to AutoCAD’s installation folder?

Yes, saving directly to C:\Program Files\Autodesk\... typically requires admin rights. Instead, save .PAT files in a shared or user folder and add that folder to the Support File Search Path.

My pattern shows correctly in the preview but not in the drawing — what’s wrong?

Check layer visibility, hatch scale, object color, and whether the hatch is on a locked or frozen layer. Also use REGEN or REGENALL to refresh the display.

Can I edit a pattern after I’ve loaded it in a drawing?

You can edit the .PAT file and then reload it or restart AutoCAD. To update existing hatches, you might need to recreate them or use HATCHEDIT to adjust scale and angle; changes to the .PAT file do not automatically update existing hatch objects.

Where can I learn the full .PAT syntax?

Consult AutoCAD’s help documentation for “Hatch pattern file format (.pat)” or use a dedicated PAT editor. That documentation explains line formats, offsets, dash/space sequences, and multi-line patterns in detail.