PrimeTimeAction Posted October 5, 2021 Share 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 Link to comment Share on other sites More sharing options...
eldon Posted October 5, 2021 Share Posted October 5, 2021 Hatching is always in the plane of the current UCS. Have you tried to write anything yourself yet? Quote Link to comment Share on other sites More sharing options...
ronjonp Posted October 5, 2021 Share 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 Link to comment Share on other sites More sharing options...
PrimeTimeAction Posted October 5, 2021 Author Share 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 Link to comment Share on other sites More sharing options...
ronjonp Posted October 5, 2021 Share Posted October 5, 2021 33 minutes ago, PrimeTimeAction said: This works very well. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 6, 2021 Share Posted October 6, 2021 If the plines vertices are all at 1 elevation then why not use "ELEV" its built in. Quote Link to comment Share on other sites More sharing options...
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.