;;; Convert selected Hatches to Solid Hatches
;;; Created by Tharwat 01. April. 2012

(defun c:H2S (/ ss)

(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)
)
(c:h2s)

Advertisements