VisDak Posted May 31, 2021 Posted May 31, 2021 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 Quote
BIGAL Posted May 31, 2021 Posted May 31, 2021 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")))) Quote
hmsilva Posted June 1, 2021 Posted June 1, 2021 Group code 450 0 = Solid hatch 1 = Gradient (ssget "_X" '((0 . "HATCH")(450 . 1))) Hope this helps, Henrique 1 Quote
Recommended Posts
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.