Helloeverybody!
I didthis basic routineto temporarily get thelayerof a selected objectand use this layer to make ahacth with some predefined settings.
The problemis that thelayerof the selected object do not remains in the hatch.
Any idea?
Thanks!
(defun c:HHH (/ clr ccr ctp)
;; get variables
(setvar "cmdecho" 0)
(setq clr (getvar "clayer"))
(setq ccr (getvar "cecolor"))
(setq ctp (getvar "celtype"))
;;get the layer needed
(command "laymcur" pause)
;set hatch variables
(setvar "hpassoc" 1)
(setvar "hpcolor" "8")
(setvar "hpdraworder" 1)
(setvar "hpname" "solid")
(setvar "hpislanddetection" 0)
(setvar "hplayer" ".")
;;do the hacth
(initdia);needed to show the hacth dialog box;
(command "_.bhatch")
;; reset variables
(setvar "clayer" clr)
(setvar "cecolor" ccr)
(setvar "celtype" ctp)
(setvar "cmdecho" 1)
);defun
Clik here to view.

Clik here to view.

Clik here to view.

Clik here to view.

Clik here to view.

Clik here to view.
