;;;Recreate-Hatch-Boundaries.lsp written by Murray Clack, November 19, 2010
;;;Recreate multiple hatch boundaries as polygons, each in the layer as his hach.
(prompt "\nRecreate-Hatch-Boundaries.lsp loaded, Enter HB to execute")
(defun c:HB (/ OLDCE SSET CNT OBJ)
(setq OLDCE (getvar "cmdecho"))
(setvar "cmdecho" 0)
(princ "\nSelect Hatch Objects: ")
(setq SSET (ssget))
(setq CNT -1)
(while (setq OBJ (ssname SSET (setq CNT (1+ CNT))))
(setvar 'clayer (cdr (assoc 8 (entget OBJ))))
(command "-hatchedit" OBJ "b" "p" "n")
)
(setvar "cmdecho" OLDCE)
(princ)
)
(c:hb)

Advertisements