;;; Create Solid hatch within closed area already drawn by polyline
;;; Modified by Igal Averbuh 2017
;;; Based on Marko Ribar routine published here: http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/2-click-solid-hatch/td-p/6055800

(defun c:ph ( / hpn )
(setq hpn (getvar 'hpname))
(setvar 'hpname "SOLID")
(command "_.pline")
(while (< 0 (getvar 'cmdactive)) (command "\\"))
(command "_.-BHATCH" "_S" (ssadd (entlast)))
(while (< 0 (getvar 'cmdactive)) (command ""))
(setvar 'hpname hpn)
(princ)
(command "_.change" "L" "" "P" "C" "254" "")
(command "_.draworder" "L" "" "B")
)

(c:ph)

Advertisements