I don't have a hatch, but to make punched rails I use some type of line, maybe you could use that.
It is based on this model:

Copy and paste directly into a drawing and you will have the type of line available.
It is for a linetype scale of 1 for units in meter
((lambda ( / f_shp f_lin doc)
(if (not (findfile "SLOT.shp"))
(progn
(setq f_shp (open (strcat (getvar "ROAMABLEROOTPREFIX") "support\\SLOT.shp") "w"))
(write-line "*250,34,SLOT" f_shp)
(write-line "002,003,100,003,10,0F4,0B4,001,008,(-99,0),0A,26,024,008,(99,0),008,(99,0),0A,26,064,008,(-99,0),002,0FC,0BC,004,100,004,10,0" f_shp)
(close f_shp)
)
)
(command "_.compile" (strcat (getvar "ROAMABLEROOTPREFIX") "support\\SLOT.shp"))
(if (not (tblsearch "STYLE" ""))
(entmakex
'(
(0 . "STYLE")
(100 . "AcDbSymbolTableRecord")
(100 . "AcDbTextStyleTableRecord")
(2 . "")
(70 . 1)
(40 . 0.0)
(41 . 1.0)
(50 . 0.0)
(71 . 0)
(42 . 2.5)
(3 . "SLOT.shx")
(4 . "")
)
)
)
(entmake
(list
'(0 . "LTYPE")
'(100 . "AcDbSymbolTableRecord")
'(100 . "AcDbLinetypeTableRecord")
'(2 . "PUNCHED-RAIL")
'(70 . 0)
'(3 . "| - - - - - |")
'(72 . 65)
'(73 . 4)
'(40 . 0.36)
'(49 . 0.0)
'(74 . 0)
'(49 . -0.18)
'(74 . 12)
'(75 . 250)
(CONS 340 (TBLOBJNAME "STYLE" ""))
'(46 . 1.0)
'(50 . 0.0)
'(44 . 0.0)
'(45 . 0.0)
'(49 . -0.18)
'(74 . 0)
'(49 . 0.0)
'(74 . 0)
)
)
(if (not (findfile "PUNCHED-RAIL.lin"))
(progn
(setq f_lin (open (strcat (getvar "ROAMABLEROOTPREFIX") "support\\PUNCHED-RAIL.lin") "w"))
(write-line "*PUNCHED-RAIL,| - - - - - |" f_lin)
(write-line "A,0,-0.18,[SLOT,SLOT.shx,U=0,S=1,X=0,Y=0],-0.18,0" f_lin)
(close f_lin)
)
)
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(if
(and
(not
(vlax-for item (vla-get-linetypes doc)
(if (= (strcase (vla-get-name item)) (strcase "PUNCHED-RAIL")) T)
)
)
(vl-catch-all-error-p
(vl-catch-all-apply
'vla-load
(list (vla-get-Linetypes doc) "PUNCHED-RAIL" "PUNCHED-RAIL.lin")
)
)
)
nil
T
)
(princ "\nTypeLine \"PUNCHED-RAIL\" has created")
(prin1)
))