MergedHatchList (append MergedHatchList entinfo2) Seedpts (append seedpts (cdr (member (assoc 98 entinfo) entinfo))) Seedpt# (+ seedpt# (cdr (assoc 98 entinfo))) "HATCH")))))Įntinfo (entget (ssname ss (setq i (1+ i))))Įntinfo2 (member (assoc 92 entinfo) entinfo)Įntinfo2 (reverse (cdr (member (assoc 75 entinfo2)(reverse entinfo2)))) (while (not ss) (princ "\nSelect hatch entities to merge:")(setq ss (ssget '((0. (If hentinfo (setq hentinfo (entget hentinfo)) (princ "\nMissed. (setq hentinfo (car (entsel "\nSelect Hatch Pattern to use:"))) (while (/= (cdr (assoc 0 hentinfo)) "HATCH") (defun c:MergeHatch ( / hentinfo ss i ent ent# seedpt# entinfo entinfo2 ent# seedpt# seedpts MergedHatchList) (Note: Even though you already selected a hatch to specify what pattern to use, you need to select that hatch again so that it is included in the selection set) Select all of the hatches that you want to be merged into one hatch.
Well, with this routine, I would no longer have to delete any hatches or join any lines. I would then hatched the newly formed polyline using a consistent hatch. So I would end up deleting all of the hatches and then turn the lines that formed the hatch boundary into polylines. At my previous job, I would receive drawing that were contained too many hatches and some hatches were not hatched correctly. I didn’t know how useful this LISP routine was until I saw it posted over at the.