RecipesDraw and lay out
How do I hatch a selected area with a pattern in AutoCAD from a sentence?
Select the closed boundary, then type "hatch this area with ANSI31". cadssistant takes the selection and runs AutoCAD's HATCH command in its command-line form with pattern ANSI31, scale 1 and angle 0 against those objects, then reports what it hatched. Say "scale 20, angle 45" or "solid fill on layer A-HATCH" to change it. With nothing selected it asks you to select the boundary through AutoCAD's own prompt.
Checked 2026-10-30 · one of the tasks cadssistant's models are benchmarked on
hatch this area with ANSI31
Paste it into the palette, or pick it from the recipes inside the chat.
What cadssistant does
- Takes the boundary from your selection, or asks "Select the boundary:" in the drawing.
- Runs AutoCAD's command-line -HATCH, as one command or one AutoLISP form: pattern ANSI31, scale 1, angle 0, then Select objects with your selection. The hatch is associative to that boundary when HPASSOC is on, which is the default.
- Replies with the pattern, scale and angle it used. Revert in the chat removes it if the scale is wrong; say the scale next time.
By hand, at the command line
Command: -HATCH
Specify internal point or [Properties/Select objects/...]: P
Enter a pattern name or [?/Solid/User defined] <ANSI31>: ANSI31
Specify a scale for the pattern <1.0000>: 1
Specify an angle for the pattern <0>: 0
Specify internal point or [Properties/Select objects/...]: S
Select objects: (pick the boundary) ↵
Specify internal point or [Properties/Select objects/...]: ↵By hand: the command-line HATCH, which is also what cadssistant drives.
Good to know
- A boundary made of separate lines must be closed with no gaps, or HATCH reports an open boundary. Say "join the lines first" and it runs PEDIT Join before hatching.
- Pattern names are the ones in your acad.pat or acadiso.pat: ANSI31, ANSI32, AR-CONC, DOTS, SOLID and so on. An unknown name fails on the command line and it reports the error.
More in draw and lay out
Command: CADSSISTANT
Works in AutoCAD 2024 and newer on Windows. Free trial, no card, no API key.
Get cadssistant