CadFrank Posted January 13, 2016 Posted January 13, 2016 Hi, Well the best thing to do is to close your 2d polyline Quote
CesarA Posted January 13, 2016 Author Posted January 13, 2016 LOL.. i'll be damned.. Yes, I meant a closed 2dpolyline.. and what after it? Quote
CadFrank Posted January 13, 2016 Posted January 13, 2016 Well you would need to select the area.. is it because your hatch scale is not good? If you just made a hatch and you dont see it, it's because your 2d polyline isn't really closed. Look in Pedit to make sure Quote
CesarA Posted January 13, 2016 Author Posted January 13, 2016 Not really, what I wanna do is select a bunch of closed polylines, like these: And I wanna fill those who have no hatch. Quote
CadFrank Posted January 13, 2016 Posted January 13, 2016 Oh!! well that's a hard one! but using select similar it should help, then you'd be able to unselect using shift the ones that have a hatch.. thats how i'd do it. Quote
Tharwat Posted January 13, 2016 Posted January 13, 2016 Hi, Just retrieve the coordinate points of each polyline then use the function ssget with mode string "_CP" or "_WP" with filter to hatch objects only and you'd be there. Quote
CesarA Posted January 13, 2016 Author Posted January 13, 2016 But in that case you are assuming the empty ones have the same dimensions.. well.. they don't :\ Quote
CesarA Posted January 13, 2016 Author Posted January 13, 2016 Thanks tharwat, I'll study the case. Did you see anyone implement such code? Quote
CadFrank Posted January 13, 2016 Posted January 13, 2016 your best option with no programming is select similar.. or else well it's to deep for my knowledge of Autolisp Quote
CesarA Posted January 13, 2016 Author Posted January 13, 2016 But Frank, there's a reason i'm posting this in a programming section thanks anyway Quote
CadFrank Posted January 13, 2016 Posted January 13, 2016 I figured you had one Well no problem wasnt much help Quote
Tharwat Posted January 13, 2016 Posted January 13, 2016 Thanks tharwat, I'll study the case. Did you see anyone implement such code? I don't need to see. Not sure he know Autolisp Programming Quote
CesarA Posted January 13, 2016 Author Posted January 13, 2016 it's good to see some comedy around Quote
CadFrank Posted January 13, 2016 Posted January 13, 2016 If you want to programme look for some code for some hatch and some polyline and mix them together. Best way to learn.... Or maybe look in Lee Mac code http://www.lee-mac.com/programs.html Quote
Tharwat Posted January 13, 2016 Posted January 13, 2016 (edited) Have a play with this simple and quickie one. (defun c:test (/ ss i sn) (if (setq ss (ssget '((0 . "LWPOLYLINE")))) (repeat (setq i (sslength ss)) (if (ssget "_CP" (mapcar 'cdr (vl-remove-if-not '(lambda (p) (= (car p) 10)) (entget (setq sn (ssname ss (setq i (1- i))))) ) ) '((0 . "HATCH")) ) (ssdel sn ss) ) ) ) (sssetfirst nil ss) (princ) ) Edited January 13, 2016 by Tharwat Quote
CadFrank Posted January 13, 2016 Posted January 13, 2016 Have a play with this simple and quickie one. Don't want to give you any disrespect Tharwat. I think he wants the code to do this.. But nice work !! (defun c:test (/ ss i s sn) (if (setq ss (ssget '((0 . "LWPOLYLINE")))) (repeat (setq i (sslength ss)) (if (setq s (ssget "_CP" (mapcar 'cdr (vl-remove-if-not '(lambda (p) (= (car p) 10)) (entget (setq sn (ssname ss (setq i (1- i))))) ) ) '((0 . "HATCH")) ) ) (ssdel sn ss) ) ) ) (sssetfirst nil ss) (princ) ) I juste removed the not on the 4th line Cheers. Quote
Tharwat Posted January 13, 2016 Posted January 13, 2016 Don't want to give you any disrespect Tharwat. I think he wants the code to do this.. But nice work !! I juste removed the not on the 4th line Cheers. Thank you Frank , you are right. 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.