Jump to content

Recommended Posts

Posted

Hi All,

 

I need help for this Lsp to select all Gradient hatches and delete.

 

(defun c:delsolidhatch ()
        (sd)
      (delbht)
(princ "\nAll Solids have been deleted!")
(princ)
  )

(defun sd (/)
   (Setq sd (ssget "_x" '((0 . "SOLID"))))
(command "_.erase" sd "")
)

(defun delbht ()
   (setq Block1 (tblnext "BLOCK" T))
   (setq Bname1 (cdr (assoc -2 Block1)))
(Fixh Bname1)
    (princ)
);defun
;;-----------------------
(defun Fixh ()
  (Setq ht2 (ssget "_x" '((0 . "SOLID"))))
(command "_.erase" ht2 "")
(princ)
);defun

 

Many Thanks

Posted

Have you looked at the properties of a HATCH use

 

(entget (car (entsel "pick hatch")))

or

(vlax-dump-object (vlax-ename->vla-object (car  (entsel "Pick obj"))))

 

 

Posted

Group code 450 

 

0 = Solid hatch
1 = Gradient

(ssget "_X" '((0 . "HATCH")(450 . 1)))

 

Hope this helps,
Henrique

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...