How AutoCAD PAT Files Work: Syntax, Angles, Offsets, Dashes, and Spacing
A technical guide to PAT headers and definition lines, including angles, origins, offsets, dash sequences, units, and formatting rules. The article focuses on practical AutoCAD behavior rather than decorative examples, so every recommendation can be checked in a real DWG.
The workflow begins with What an AutoCAD PAT File Contains, continues through Anatomy of a Hatch Pattern Definition, and then addresses Understanding a PAT Definition Line. The final checks cover editing stability, portability, and plotted output where they are relevant.
What an AutoCAD PAT File Contains
What an AutoCAD PAT File Contains establishes the main concept for this part of the guide. The explanation connects it directly to AutoCAD PAT file syntax and the decisions that follow.
What an AutoCAD PAT File Contains defines the role of this item within AutoCAD PAT file syntax and separates it from similar AutoCAD objects or settings. Treat this setting as part of a controlled hatch workflow rather than an isolated option. Confirm the geometry, pattern definition, layer state, and plotted result together. Apply the setting to a small representative area, note the working value, and confirm that it supports the goal of AutoCAD PAT file syntax.
Anatomy of a Hatch Pattern Definition
This section covers Pattern Name and Description, Pattern Definition Lines, and Rules for Naming Custom Patterns. The goal is to turn anatomy of a hatch pattern definition into a sequence that can be tested and repeated in a production drawing.
For the setup behind Anatomy of a Hatch Pattern Definition, the guide to creating a simple custom hatch pattern explains turning a planned repeat into a working plain-text PAT definition.
Pattern Name and Description
Pattern Name and Description affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. In a PAT definition, the header begins with an asterisk followed by the pattern name. Keep names short, unique, and easy to recognize in the hatch palette. Use a unique ASCII-friendly name and, for a one-pattern custom file, keep the PAT filename and pattern name consistent.
Pattern Definition Lines
Pattern Definition Lines affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. A pattern definition describes one or more families of parallel lines. AutoCAD repeats those families and clips them at the selected boundary. Apply the setting to a small representative area, note the working value, and confirm that it supports the goal of AutoCAD PAT file syntax.
Rules for Naming Custom Patterns
Rules for Naming Custom Patterns affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. Treat this setting as part of a controlled hatch workflow rather than an isolated option. Confirm the geometry, pattern definition, layer state, and plotted result together. Apply the setting to a small representative area, note the working value, and confirm that it supports the goal of AutoCAD PAT file syntax.
Understanding a PAT Definition Line
This section covers Line Angle, X and Y Origin, and Delta-X and Delta-Y Offsets. Additional checks complete the section. The goal is to turn understanding a pat definition line into a sequence that can be tested and repeated in a production drawing.
Line Angle
Line Angle affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. The angle is measured in degrees relative to the drawing coordinate system. A second line family can use another angle to create a crosshatch. Test the angle against a known horizontal or vertical reference and confirm whether the design intent follows the world axes, the current UCS, or a material joint.
X and Y Origin
X and Y Origin affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. The X and Y origin values establish a reference point for that line family. They are not the same as the interactive hatch origin assigned to a placed hatch object. Pick one project reference point and assign that same origin to adjacent hatches so the repeating module continues across separate boundaries.
Delta-X and Delta-Y Offsets
Delta-X and Delta-Y Offsets affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. Delta-X and Delta-Y control how successive members of a line family are shifted and spaced. Small errors in either value can produce drift or a visible seam. Apply the setting to a small representative area, note the working value, and confirm that it supports the goal of AutoCAD PAT file syntax.
Dash and Gap Values
Dash and Gap Values affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. Positive values draw a segment, negative values create a gap, and a zero value produces a dot. The sequence repeats along every generated line. Use a temporary closed polyline as a control test. If that polyline hatches correctly, repair the original contour instead of changing the PAT file.
Positive Values for Drawn Segments
Positive Values for Drawn Segments affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. Use a positive value for the length of a visible dash. Keep the value proportional to the pattern module so the sequence closes cleanly. Apply the setting to a small representative area, note the working value, and confirm that it supports the goal of AutoCAD PAT file syntax.
Negative Values for Gaps
Negative Values for Gaps affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. A negative value defines an empty interval between visible segments. Its absolute value is the gap length. Use a temporary closed polyline as a control test. If that polyline hatches correctly, repair the original contour instead of changing the PAT file.
Zero Values for Dots
Zero Values for Dots affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. A zero creates a dot rather than a dash. Dense dot sequences can increase display and plotting work. Apply the setting to a small representative area, note the working value, and confirm that it supports the goal of AutoCAD PAT file syntax.
Basic PAT structure
*SIMPLE_GRID, Simple square grid
0, 0,0, 0,10
90, 0,0, 0,10The header and pattern lines must be on separate lines. The numeric values above are only an example; the final appearance depends on the hatch scale and drawing units.
How Repeated Pattern Lines Are Generated
This section covers Base Lines and Parallel Copies, Horizontal and Vertical Offsets, and Creating Multiple Line Families. The goal is to turn how repeated pattern lines are generated into a sequence that can be tested and repeated in a production drawing.
The decisions under How Repeated Pattern Lines Are Generated connect directly to testing and debugging PAT files, which covers finding syntax, spacing, offset, and display errors before deployment.
Base Lines and Parallel Copies
Base Lines and Parallel Copies affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. Treat this setting as part of a controlled hatch workflow rather than an isolated option. Confirm the geometry, pattern definition, layer state, and plotted result together. Apply the setting to a small representative area, note the working value, and confirm that it supports the goal of AutoCAD PAT file syntax.
Horizontal and Vertical Offsets
Horizontal and Vertical Offsets affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. Treat this setting as part of a controlled hatch workflow rather than an isolated option. Confirm the geometry, pattern definition, layer state, and plotted result together. Apply the setting to a small representative area, note the working value, and confirm that it supports the goal of AutoCAD PAT file syntax.
Creating Multiple Line Families
Creating Multiple Line Families affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. Treat this setting as part of a controlled hatch workflow rather than an isolated option. Confirm the geometry, pattern definition, layer state, and plotted result together. Apply the setting to a small representative area, note the working value, and confirm that it supports the goal of AutoCAD PAT file syntax.
Units and Pattern Dimensions
This section covers Unitless PAT Definitions, Metric and Imperial Interpretation, and The Effect of Hatch Scale. The goal is to turn units and pattern dimensions into a sequence that can be tested and repeated in a production drawing.
Unitless PAT Definitions
Unitless PAT Definitions affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. Treat this setting as part of a controlled hatch workflow rather than an isolated option. Confirm the geometry, pattern definition, layer state, and plotted result together. Apply the setting to a small representative area, note the working value, and confirm that it supports the goal of AutoCAD PAT file syntax.
Metric and Imperial Interpretation
Metric and Imperial Interpretation affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. Treat this setting as part of a controlled hatch workflow rather than an isolated option. Confirm the geometry, pattern definition, layer state, and plotted result together. Record the drawing unit, MEASUREMENT value, PAT unit assumption, and hatch scale together; none of those values should be evaluated in isolation.
The Effect of Hatch Scale
The Effect of Hatch Scale affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. Scale multiplies the dimensions stored in the pattern definition. Evaluate the result in model space and at the intended plotted viewport scale. Change scale by a clear factor such as 2, 10, 25.4, or 1000, then compare the pattern with a known dimension and the target paper scale.
PAT File Formatting Rules
This section covers Required Line Breaks, Decimal Separators, and Plain-Text Encoding. Additional checks complete the section. The goal is to turn pat file formatting rules into a sequence that can be tested and repeated in a production drawing.
Required Line Breaks
Required Line Breaks affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. The header and numeric definition cannot be merged onto one line. Each additional line family also requires its own line in the file. Apply the setting to a small representative area, note the working value, and confirm that it supports the goal of AutoCAD PAT file syntax.
Decimal Separators
Decimal Separators affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. PAT syntax uses periods for decimal values and commas to separate parameters. A locale-specific decimal comma makes the numeric fields ambiguous. Apply the setting to a small representative area, note the working value, and confirm that it supports the goal of AutoCAD PAT file syntax.
Plain-Text Encoding
Plain-Text Encoding affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. PAT files must remain plain text. Rich-text formatting, smart punctuation, or a hidden .txt extension can make a correct definition unreadable to AutoCAD. Save as plain text, verify the real .pat extension in the operating system, and remove smart punctuation or hidden formatting.
Pattern Complexity Limits
Pattern Complexity Limits affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. Very long dash sequences and many line families can increase generation and display work. Simplify the module before distributing it to large projects. Measure the effect after simplifying the boundary, increasing pattern scale, reducing source detail, or freezing the hatch layer during editing.
Reading a Complete PAT Example
This section covers Identifying Each Parameter, Predicting the Visual Result, and Modifying the Pattern Safely. The goal is to turn reading a complete pat example into a sequence that can be tested and repeated in a production drawing.
To verify Reading a Complete PAT Example, use repairing missing or invalid hatch pattern files to check diagnosing missing files, duplicate names, encoding errors, and invalid definitions.
Identifying Each Parameter
Identifying Each Parameter affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. Treat this setting as part of a controlled hatch workflow rather than an isolated option. Confirm the geometry, pattern definition, layer state, and plotted result together. Apply the setting to a small representative area, note the working value, and confirm that it supports the goal of AutoCAD PAT file syntax.
Predicting the Visual Result
Predicting the Visual Result affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. Treat this setting as part of a controlled hatch workflow rather than an isolated option. Confirm the geometry, pattern definition, layer state, and plotted result together. Apply the setting to a small representative area, note the working value, and confirm that it supports the goal of AutoCAD PAT file syntax.
Modifying the Pattern Safely
Modifying the Pattern Safely affects how reliably AutoCAD PAT file syntax can be edited, shared, and plotted. Treat this setting as part of a controlled hatch workflow rather than an isolated option. Confirm the geometry, pattern definition, layer state, and plotted result together. Apply the setting to a small representative area, note the working value, and confirm that it supports the goal of AutoCAD PAT file syntax.
Practical Verification Checklist
- What an AutoCAD PAT File Contains: verify this item in a test area before applying the final hatch throughout the drawing.
- Pattern Name and Description: verify this item in a test area before applying the final hatch throughout the drawing.
- Line Angle: verify this item in a test area before applying the final hatch throughout the drawing.
- Base Lines and Parallel Copies: verify this item in a test area before applying the final hatch throughout the drawing.
Related CAD Hatch Guides
Use these related guides to move from the current subject into the next practical step without repeating the same troubleshooting or setup procedure.
