How to Create Custom Hatch Patterns (.PAT) and Use SUPERHATCH in GstarCAD
Learn how to write vector .pat hatch pattern definitions (angle, origin, delta-x, delta-y, dash-gap) and tile blocks or raster textures using SUPERHATCH in GstarCAD.
For simple repeating linear/brick patterns, create an ASCII .pat file named identically to the pattern (*MY_BRICK) inside your GstarCAD Support folder (ending with a mandatory blank carriage-return line). For complex curved tiles, stone masonry, or wood textures, use the Express Tool SUPERHATCH with a Block or Image.
1. Root Cause & DWG Database Symptom Analysis
Architectural elevations, landscaping paving plans, and geological cross-sections often require custom tile ratios, staggered timber cladding, or irregular stone patterns that go beyond standard `ANSI31` or `AR-BRSTD` hatches in GstarCAD.
2. Step-by-Step Resolution in GstarCAD & AutoCAD
Step 1: Understand the 5-Parameter .PAT Vector Line Syntax
Each line in a `.pat` file defines an infinite family of parallel lines: Angle, X-Origin, Y-Origin, Delta-X, Delta-Y, [Dash, -Gap...]. Here, Delta-Y is the perpendicular spacing between parallel lines, while Delta-X shifts the dash pattern along each successive parallel line (used for staggered brick running bonds!).
Step 2: The Golden Rule of Custom .PAT Files
When saving a standalone custom pattern file (e.g., EuroTile_600x300.pat), the filename must exactly match the pattern header name (*EuroTile_600x300, 600x300mm Porcelain Tile), and you must leave at least one blank empty line at the bottom of the file or GstarCAD/AutoCAD will throw a "Missing parameter on line..." error.
Step 3: Use SUPERHATCH for Curved Roof Tiles, Blocks & Raster Textures
Because `.pat` files only support straight line segments and dots, use SUPERHATCH (Express Tools) to tile any CAD `BLOCK`, `XREF`, `WIPEOUT`, or raster `IMAGE` inside a closed boundary with automatic boundary clipping!
3. System Variables & Command Diagnostic Table
| Variable / Command | Default / Target Value | Diagnostic Function & Fix Behavior |
|---|---|---|
Delta-Y |
Perpendicular Spacing | Distance between parallel hatch lines in the family |
Delta-X |
Stagger Shift | Shifts dashed segments along alternate rows (staggered brick/tile) |
Trailing Blank Line |
Mandatory in .PAT | Prevents 'Bad pattern definition' EOF parser error |
SUPERHATCH |
Express Command | Tiles any Block or Raster Image inside a closed polyline boundary |
4. One-Click AutoLISP Fix Script (AutoLISP Custom 600x300mm Staggered Running-Bond Tile .PAT Generator)
(defun c:MAKE-TILE-PAT ( / fn fp)
(setq fn (strcat (getvar "ROAMABLEROOTPREFIX") "Support\\TILE600X300.pat")
fp (open fn "w"))
(write-line "*TILE600X300, 600x300mm Staggered Running Bond Tile" fp)
(write-line "0, 0,0, 0,300" fp) ; Continuous horizontal joints every 300mm
(write-line "90, 0,0, 300,300, 300,-300" fp) ; Vertical joints staggered every 300/600mm
(write-line "" fp) ; Mandatory trailing blank line!
(close fp)
(princ (strcat "\n[PAT Generator] Created custom hatch: " fn))
(princ)
)
Enterprise AC1032 Database Internals & Cross-Version Diagnostics
In multi-office engineering environments operating across GstarCAD 2027, GstarCAD Mechanical, GstarCAD Architecture, and legacy AutoCAD (2018–2027) seats, mastering How to Create Custom Hatch Patterns (.PAT) and Use SUPERHATCH in GstarCAD requires understanding how the underlying AC1032 DWG binary database serializes entity handles, symbol table records, and Named Object Dictionary (NOD) pointers.
1. DWG Header & Registry Persistence Scope
Variables and object properties fall into three persistence scopes: Drawing-Saved (DXF Header) variables that travel with the .dwg file to subcontractors, Registry-Saved (Profile .arg) settings that persist per Windows workstation user, and Session-Volatile states that reset on every launch unless locked inside acaddoc.lsp. Always verify persistence scope via SYSVDLG before issuing sheets to an ISO 19650 Common Data Environment (CDE).
2. Multi-Core Regeneration & Memory Hygiene
When processing large civil corridors, dense plant P&IDs, or 50-sheet architectural Xref trees, unpurged Registered Application IDs (REGAPP), orphaned DGN stroke dictionaries, and redundant annotation scales degrade spatial index (INDEXCTL = 3) lookup speed. Executing a pre-submittal AUDIT, command-line -PURGE → Regapps, and OVERKILL pass keeps file open times under 2 seconds on GstarCAD's multi-threaded graphics kernel.
3. Hybrid AutoCAD + GstarCAD Team Coexistence
Because GstarCAD reads and writes native AC1032 binary records without intermediate import/export translation, dynamic block grips, associative hatches, XData payloads (DXF groups 1000–1071), Paper Space viewport layer overrides (VPLAYER), and X.509 digital signatures round-trip losslessly between AutoCAD and GstarCAD seats on shared SMB/BIM cloud folders.
Production Field Verification Protocol (ISO 9001 / ISO 19650 Gate)
- Baseline Template Audit: Confirm that the active drawing inherits layer naming, linetype scales (
PSLTSCALE = 1,MSLTSCALE = 1,LTSCALE = 1.0), and dimension styles from the enterprise.dwt/.dwsstandards file viaCHECKSTANDARDS. - Coordinate & Unit Integrity: Run
-DWGUNITSor checkINSUNITS,LUNITS, andMEASUREMENTto guarantee 1:1 metric (`mm`/`m`) or imperial (`in`/`ft`) block and Xref insertion scaling, withOSNAPZ = 1preventing unintended 3D elevation drift. - Submittal Packaging & Mobile Review: Lock all Paper Space viewports (`DisplayLocked = Yes`), bind or relative-path all external references via
ETRANSMIT, and verify final plotted PDF/A lineweights (`ISO full bleed`) alongside DWG FastView mobile cloud markup links.
Related Engineering Guides, Courses & Troubleshooting FAQs
Continue building your CAD engineering mastery with these related GstarCAD Academy technical references:
- [Engineering Guide] Architectural & Structural Drawing Scales, Text Heights & DIMSCALE Master Chart
- [Engineering Guide] Course 22: Advanced Nested Dynamic Blocks, Double-Lookup Tables & Chained Actions
- [Engineering Guide] Course 28: Mechanical Detail Views (AMDETAIL), Associative Balloons & Multi-Level BOM Rollups
- [Troubleshooting FAQ] How to Create Custom Linetypes (.LIN) with Embedded Text or Shapes (MKLTYPE & MKSHAPE)
- [Troubleshooting FAQ] How to Extract X, Y, Z Coordinates of Points, Blocks & Polylines to CSV / Excel in GstarCAD
- [Troubleshooting FAQ] How to Fix FILEDIA: Open, Save & Plot File Dialog Box Missing (Showing Command Prompt)
- [Skill Certification] Test Your Mastery on the 850-Question GstarCAD Engineering Certification Engine →
Need 100% Native DWG Compatibility Without Subscription Lock-In?
Engineered by Suzhou Gstarsoft Co., Ltd. (SSE: 688657), GstarCAD 2027 opens, repairs, and plots AC1032 DWG files with full command and AutoLISP parity.