; This program selects all hatches and places them

; on 0-HATCH (a user-specified) layer.

; Modified by Igal Averbuh 2015

(defun C:hl (/ SETD LAY) ; Begin function

(setvar "CMDECHO" 0) ; Turn off command echo

(setq SETD (ssget "X" '((0 . "HATCH")))) ; Selection set of dims

(if (null SETD) ; If there are no dims

(princ "\nThere are no associated hatches.") ; THEN tell user

(progn ; ELSE begin (progn)

;(setq LAY (getstring "\nTransfer to which layer? ")) ; Remove remark if you want to place hatch on a user-specified layer.
(command "-layer" "n" "0-HATCH" "C" "9" "0-HATCH" "")

(command ".CHPROP" SETD "" "LA" "0-HATCH" "") ; Change dimensions to layer

) ; End (progn)

) ; End (if)

(setvar "CMDECHO" 1) ; Turn on command echo

(princ) ; Clean exit

) ; End function

; - -( End of Program )- -

(C:HL)

Advertisements