PrimeTimeAction Posted October 5, 2021 Posted October 5, 2021 I have multiple closed polylines which i need to hatch. The Hatch needs to be at the elevation of the polylines. Currently i create multiple hatches and move them on by one througgh property pane or move command. Is there a way to eliminate this step and draw the hatches at the elevation of the objects? Quote
eldon Posted October 5, 2021 Posted October 5, 2021 Hatching is always in the plane of the current UCS. Have you tried to write anything yourself yet? Quote
ronjonp Posted October 5, 2021 Posted October 5, 2021 Assuming the hatch is associative, try this: (defun c:foo (/ lw s v) (if (setq s (ssget ":L" '((0 . "HATCH")))) (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (and (setq lw (cdr (assoc 330 (reverse (entget e))))) (setq v (cdr (assoc 38 (entget lw)))) (vla-put-elevation (vlax-ename->vla-object e) v) ) ) ) (princ) ) 1 Quote
PrimeTimeAction Posted October 5, 2021 Author Posted October 5, 2021 1 hour ago, ronjonp said: Assuming the hatch is associative, try this: (defun c:foo (/ lw s v) (if (setq s (ssget ":L" '((0 . "HATCH")))) (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (and (setq lw (cdr (assoc 330 (reverse (entget e))))) (setq v (cdr (assoc 38 (entget lw)))) (vla-put-elevation (vlax-ename->vla-object e) v) ) ) ) (princ) ) This works very well. Quote
ronjonp Posted October 5, 2021 Posted October 5, 2021 33 minutes ago, PrimeTimeAction said: This works very well. Quote
BIGAL Posted October 6, 2021 Posted October 6, 2021 If the plines vertices are all at 1 elevation then why not use "ELEV" its built in. 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.