really really really really thank you .
I'm sorry, but can I ask you one more thing?
I added the following code.
However, the harm does not become an extrud.
pls Can you help?
"command extrude" is possible
(defun h2r ( ss num / el i h reg sp )
(vl-load-com)
(or *acdoc*
(setq *acdoc* (vla-get-ActiveDocument (vlax-get-acad-object)))
)
(setq el (entlast))
(setq s (ssadd))
(repeat (setq i (sslength ss))
(setq h (ssname ss (setq i (1- i))))
(setq la (cdr (assoc 8 (entget h))))
(setvar "clayer" la)
(command "_.-HATCHEDIT" h "_B" "_R" "_N")
(command "_.-HATCHEDIT" h "_DI")
(if (not (eq el (entlast))) (ssadd (entlast) s))
)
(command "_erase" ss "")
(vlax-for obj (setq
s (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object)))
)
;; If we already have a region extrude it
(if (= "AcDbRegion" (vla-get-objectname obj))
(vla-addextrudedsolid sp obj num 0.0)
;; Else try to create a region and extrude it
(or (vl-catch-all-error-p
(setq reg (vl-catch-all-apply 'vlax-invoke (list sp 'addregion (list obj))))
)
(and (vla-addextrudedsolid sp (car reg) num 0.0) (vla-delete (car reg)))
)
)
)
(princ)
)
( defun c:hs2 ( / )
(setq ss (ssget "_:L" '((0 . "HATCH"))))
( h2r ss 100 )
)