I am looking to streamline our background conversion process. I have everything working that I want so far. However, I am looking to script something that changes the Hatch --> Pattern --> Background Color to None. I have tried multiple lisps and even utilized chat GPT (awesome tool BTW). See below for what I have tried to start along with a screenshot of the parameter I am trying to change. Any assistance would be greatly appreciated.
Code:
(defun c:ChangeAllHatchesToNone ()
(vl-load-com)
(setq ss (ssget '((0 . "HATCH"))))
(if ss
(progn
(setq i 0)
(repeat (sslength ss)
(setq ent (ssname ss i))
(if (and ent (entget ent))
(entmod (subst '(62 . 256) (assoc 62 (entget ent)) (entget ent))) ; 256 represents BYLAYER
)
(setq i (1+ i))
)
(princ "\nHatch pattern background color set to 'ByLayer' for selected hatches.")
)
(princ "\nNo hatches found.")
)
(princ)
)