Written by Allan, 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:
Reason:
SNAPBASE needs to be set where you wish the hatch pattern datum to begin from. Solutions:
- Set the SNAPBASE system variable, to the bottom left hand corner (see picture above).
- 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