Today’s featured routine will help you if you need to change some or all hatches to the solid hatch pattern.
Here’s how:
- HATCH2SOLID <enter>
- Create a selection set by either individual selection or window/crossing selection.
- Or
- As shown in the animation: type ALL <enter> in the command line to select all hatches in the drawing.
- Hit <enter> once more to except the selection set.
~enjoy
(defun c:Hatch2Solid (/ ss)
;;; Tharwat 01. April. 2012 ;;;
(vl-load-com)
(cond ((not acdoc)
(setq acdoc (vla-get-activedocument (vlax-get-acad-object)))
)
)
(if (setq ss (ssget "_:L" '((0 . "HATCH") (2 . "~SOLID"))))
(progn
(vla-StartUndoMark acdoc)
((lambda (i / sn)
(while
(setq sn (ssname ss (setq i (1+ i))))
(vla-setPattern
(vlax-ename->vla-object sn)
acHatchPatternTypePreDefined
"SOLID"
)
)
)
-1
)
(vla-EndUndoMark acdoc)
)
(princ)
)
(princ)
)