• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
blog.draftsperson.net

blog.draftsperson.net

the art of technical drawing

blog.draftsperson.net

AutoCAD: Set Where a Hatch Starts (SNAPBASE)

February 22, 2003

Last updated July 29, 2026

Written by YZ, 22 Feb 2003

Applies to:

  • AutoCAD 2004 and below
  • May also apply to R14

Problem:

The Hatch Pattern does not start where I want it. Example of CMU hatch:
Two blockwork hatches side by side labelled WRONG and RIGHT: on the left the pattern starts mid-block against the boundary, on the right it starts cleanly at the bottom left corner where SNAPBASE was set

Reason:

SNAPBASE needs to be set where you wish the hatch pattern datum to begin from. Solutions:
  1. Set the SNAPBASE system variable, to the bottom left hand corner (see picture above).
  2. Use this AutoLISP code to edit the hatch pattern, after it has be created.
(defun c:AHSP (/ OBJ PT1 XCORD YCORD SP1 SB1)
(setvar "cmdecho" 0)
(setq
SB1 (getvar "snapbase")
OBJ (entsel "nSelect Hatch pattern to edit:")
PT1 (getpoint "nSelect new starting point of hatch pattern:")
XCORD (car PT1)
YCORD (cadr PT1)
SP1 (list XCORD YCORD)
)
(setvar "snapbase" SP1)
(command "-hatchedit" OBJ "p" "" "" "")
(setvar "snapbase" SB1)
(princ)
); end of c:AHSP

Filed Under: AutoCAD Bugs & Problems, AutoCAD Tips, Hatch Patterns

Primary Sidebar

Subscribe to our Youtube Channel

Post CAD drafting jobs on Freelancer.com. and get some free money to do this.

Categories

  • American Steel Industry (4)
  • AutoCAD Articles & Reference (30)
  • AutoCAD Bugs & Problems (19)
  • AutoCAD Tips (29)
  • AutoCAD Tutorials (54)
  • AutoLISP Routines (328)
  • AutoLISP Tutorials (15)
  • CAD Standards (7)
  • Civil 3D (7)
  • Civil Drafting (4)
  • Dimensions (2)
  • Drafting Funnies (71)
  • Drafting History (9)
  • Drafting Standards (84)
  • Electrical Drafting (2)
  • General IT reference (7)
  • Geometry (15)
  • GIS (2)
  • Hatch Patterns (12)
  • Office Life Hacks (3)
  • PT (1)
  • Revit Tutorials (54)
  • Steel Detailing (14)
  • Structural Drafting (26)
  • Technical Dictionary (61)
  • Useful Website Links (19)

Footer

Free downloads

  • Free AutoLISP routines
  • Free hatch patterns
  • SHX fonts & text styles
  • Numbering LISP collection
  • ISO 3098B font

Reference charts

  • AWS weld symbols chart
  • Steel detailing chart
  • Hole & slot sizes
  • Bolt edge distance
  • ANSI & ARCH paper sizes
  • How to fold an A1 drawing

Useful links

  • CAD blocks (DWG)
  • Revit families
  • structuraldrafter.com
  • cad-corner.com
  • About
  • Privacy policy

Provided for free with no warranty · Log in