BIM

The hatch command in AutoCAD: 83 built-in patterns, scale, origin and loading a library

The hatch command in AutoCAD fills materials and sections. Covers the 83 built-in patterns, picking a scale, setting the origin and loading a PAT file.

  • Assoc. Prof. Tran Anh Binh
  • 11 min read
The six most used material symbols and their pattern names, all shipping in the 2027 release Photo: Diagram by the Institute of Information Technology in Civil Engineering

The hatch command in AutoCAD fills materials and sections, and its alias is H. But most people searching for it are not stuck on calling the command — they are stuck because the fill comes out wrong, or they are hunting for new patterns without knowing how many the installation already carries.

The number worth knowing first: the acadiso.pat file in the 2027 release defines 83 patterns, one solid fill and 82 line patterns. A great many people go looking for a library before exhausting what is already installed. To learn modelling and documentation end to end, see the AutoCAD for construction course.

Six material symbols already installed

Construction drawings use hatching to tell materials apart. There is no single mandatory symbol table, but there is a set of conventions most Vietnamese offices follow, and every symbol in it already has a pattern.

MaterialBuilt-in patternNotes
Cut brickworkANSI31Lines at 45 degrees. The most familiar symbol on Vietnamese drawings
Reinforced concreteAR-CONCDots and aggregate. Overlay ANSI31 on the same region for reinforced concrete
Blinding concreteSACNCROr AR-SAND for a sand bed
Natural groundEARTHFor the soil below a foundation
SandAR-SANDA random dot pattern
GravelGRAVEL
TimberGOST_WOOD or JIS_WOODThe two differ in grain density
InsulationINSUL
Floor tilingNET square · AR-PARQ1 parquet · AR-HBONE herringbone
Solid fillSOLIDConcrete columns at small scale, once the hatch lines crowd together

Three groups can be ignored for building work: names beginning ACAD_ISO follow the ISO standard, JIS the Japanese standard, GOST the Russian one.

One requirement many drawing sets forget: a hatch symbol needs a legend beside the title block. A builder cannot tell brick from concrete by the hatching alone.

Calling the command: four options, two interfaces

The Hatch button sits on the Draw panel of the Home tab. Type HATCH, or H, or BH. The 2027 prompt carries four options.

Pick internal point or [Select objects/Draw/Undo/seTtings]:

OptionWhat it does
Pick internal pointThe default. Click inside a region and the program traces the boundary
Select objectsPick the boundary objects directly. Use it when the boundary is already a closed polyline
DrawDraw a new boundary and fill it in one go. A newer option, handy when no boundary exists
seTtingsOpens the Hatch and Gradient dialog, the older interface

The 2027 release has two interfaces, chosen by HPDLGMODE. It defaults to 2, a contextual ribbon tab. Set it to 1 and the old dialog returns, which gathers every field in one place and is easier to take in at a glance. See the HPDLGMODE (System Variable) page.

Scale: the cause of both a black blob and an empty region

This is where most fills go wrong, and it produces two opposite symptoms that people mistake for two separate faults.

The same ANSI31 pattern at three scales Photo: From the left: Scale 1 turns into a solid grey blob, Scale 40 is readable, Scale 400 leaves a single line across the square

The same ANSI31 pattern on three identical squares, differing only in scale:

ScaleLine spacingResult
13.175 unitsSolid black — the lines overlap each other
40127 unitsReadable; this is a usable value
4001270 unitsAlmost empty — one line of the pattern is longer than the region

The rule: a black blob means the scale is too small; an empty fill means the scale is too large. Both are fixed with the Scale field, not by changing pattern.

Angle is the second field. Note that the angle you enter is added to the pattern's own angle: ANSI31 already runs at 45 degrees, so entering 45 makes 90 and the lines stand vertical.

ANSI31 with an angle of 45 degrees Photo: Entering 45 for ANSI31 adds to the pattern's built-in 45 degrees, making 90, so the lines stand vertical

Hatch origin: the fourth field nobody notices

The three fields above decide how the pattern looks. The fourth decides where it starts, and it only shows its hand when you fill floor tiling or brickwork.

A hatch pattern is not glued to the region it fills. It is an infinite grid spread across the whole drawing, and the command simply clips the part of that grid falling inside the region. The anchor of that grid is the hatch origin, set to 0,0 in a new drawing and readable through HPORIGIN.

The consequence: fill a 600 by 600 tile pattern anywhere and the first tile is almost certain to be cut short, because the edge of the region does not land on a grid node.

The Origin option offers three routes:

RouteWhat it does
Use current originKeeps the existing origin. The default
Set new originPick a point as the new origin. The command then asks Store as default origin?
Default to boundary extentsUses a corner or the centre of the region's bounding box. Handy for rectangles

Answer No to Store as default origin. Yes changes the origin for the whole drawing, so later fills elsewhere come out misaligned. The origin belongs to one hatch, not to the drawing.

For floor tiling, set the origin at a corner of the room and check where the cut tile falls. A builder needs to know which edge the tiling starts from. This is where a hatch stops being decoration and becomes construction information.

Island modes and boundary gaps

An island is a closed shape inside the filled region — a column in a room, a stair void in a slab. The program handles islands three ways.

The three island modes Photo: Left Normal alternates filled and unfilled; middle Outer fills only the outermost region; right Ignore fills straight through every island

A fresh 2027 install uses Outer, and for building work that is the right mode: fill a slab and columns and stair voids are left clear.

Gaps are the second issue. Draw a region from four lines with one falling a few units short and clicking inside returns:

Valid hatch boundary not found.

The Gap tolerance field, the HPGAPTOL variable, lets the program overlook gaps smaller than the value you set. It defaults to 0, forgiving nothing. Set 10, run the command again, and the fill appears as though the shape were closed. See the HPGAPTOL (System Variable) page.

One more trap on a real plan: the column grid runs along the centre of the wall, so the wall is split in two by the grid line. Click exactly on the grid and the program refuses with Point is directly on an object. The tidiest answer is to switch off the grid layer before filling, so the full wall thickness becomes one region.

Associative: the fill follows its boundary

Associative is on by default, HPASSOC equals 1, and it should stay that way. The fill then tracks its boundary: edit the boundary and the fill follows.

An associative fill stretching with its boundary Photo: Left: the room as filled. Right: after the boundary is stretched wider, the fill extends on its own with no need to re-hatch

It can be measured: stretch the right-hand wall out by 600 and the fill extends, with the Area field in Properties moving from 2,240,000 to 2,480,000 — exactly the extra wall length.

To edit an existing fill, type HATCHEDIT, alias HE, or simply double-click it. The Properties palette, opened with Ctrl and 1, edits every value without calling a command and reads out the area as well.

Inherit Properties is the biggest time-saver in the dialog: click it, then click an existing fill, and you take its pattern, scale and angle wholesale.

Loading a hatch library from outside

When the 83 built-in patterns are genuinely not enough, you download a .pat file. This is where many downloads refuse to work, and Autodesk sets out four conditions.

ConditionDetail
Pattern name 31 characters or fewerLonger names are not recognised
A blank line at the end of the fileWithout it, the last pattern in the file is unusable
The file sits in the Support File Search PathDeclare the folder in OPTIONS, Files tab
File name matches the pattern nameA pattern called WATER must live in water.pat

There is a tidier route: paste the pattern definition straight into acadiso.pat, in its User Defined Hatch Patterns section. Then there are no separate files to keep and no extra search paths to declare. Autodesk covers this on the FAQ: Why can't I use my custom hatch pattern (PAT) files? page.

Before downloading anything, type -HATCH, then P, then a question mark and Enter: the program lists every pattern currently available with its description. Often the pattern you want is already there.

Reading area from a filled region

A hatch is not only for looking at. Select one, open the Properties palette, and the Area field reads out a figure that already excludes the islands inside — more accurate than measuring by hand.

There are three ways to read area: the Properties palette for a single region, the LIST command which prints area, perimeter and vertex coordinates, and the AREA command which adds and subtracts regions through its Add area and Subtract area options.

One source of error that keeps appearing in schedules: area is reported in square drawing units. On a drawing in millimetres one square metre is one million units, so divide by a million to reach square metres.

A workable routine for a house drawing set:

  1. Build a boundary for each room with BOUNDARY, clicking once inside. Put those boundaries on their own layer and switch it off when plotting.
  2. Select each boundary and read the Area field.
  3. Divide by a million for square metres.
  4. Write the figure into the schedule.
  5. Cross-check: the rooms plus the walls must equal the gross area. More than a few percent out means a room has been missed or two boundaries overlap.

Frequently asked questions

What is the alias for the hatch command in AutoCAD?

Type H and press Enter. The command-line form is -HATCH, which asks for pattern, scale and angle in turn before the pick point.

Why does my fill come out solid black?

The scale is too small, so the pattern lines overlap. Raise the Scale value rather than changing pattern.

Why does nothing appear after hatching?

The opposite: the scale is too large, and one line of the pattern is longer than the region. Lower the Scale value.

Why does the program say it cannot find a boundary?

The boundary is open. Set HPGAPTOL to 10 and try again, or rebuild the boundary with BOUNDARY.

I downloaded a hatch library and it does not work. Why?

Check the four conditions: pattern name under 31 characters, a blank line at the end of the file, the file inside the Support File Search Path, and the file name matching the pattern name. The tidiest fix is to paste the pattern into acadiso.pat.

About the author

Assoc. Prof. Tran Anh Binh — Director of the Institute of Information Technology in Civil Engineering – Hanoi University of Civil Engineering