(defun c:chl ()
(setq entlist (entget (car (entsel "\nSelect object to set layer as current: "))))
(setvar "clayer" (cdr (assoc 8 entlist)))
)

(defun c:hmk () ; Solid Background Hatch Maker in selected layer. Created by Igal Averbuh 2015
(SetVar "cmdecho" 1)
(SetVar "osmode" 0)
(setq *ERROR* STOP)
(setq p1 (getpoint "\nFIRST SOLID HATCH CORNER: "))
(setq p3 (getcorner p1 "\nSECOND SOLID HATCH CORNER: "))
(setq p2 (list (car p1) (cadr p3)))
(setq p4 (list (car p3) (cadr p1)))
(command "PLINE" p1 "W" 0 0 p2 p3 p4 "C")
(command "-hatch" "p" "s" "")
(command "-hatch" "s" "l" "" "p" "s" "co" "t" "255,255,255" "" )
(c:os)

)
(c:chl)
(c:hmk)
;

Advertisements