samifox Posted March 28, 2014 Share Posted March 28, 2014 Hi The idea is to simplify a selection of connected lines which are not assembled as 1 polyline. user can select only the starting line , and have all the lines connected to it (or close to be connected to it) joined, and converted into a polyline i was thinking about something like "fillit" command , but i want the selection set to be chosen by a condition see the attached images any ideas? Thanks Shay Quote Link to comment Share on other sites More sharing options...
MSasu Posted March 28, 2014 Share Posted March 28, 2014 This is behavior seems to be already built-in in PLINE command; please check the Multiple input option and Join with Fuzzy factor. For sure will need to select more than one item, but would be possible to write a simple AutoLISP routine or a button macro to automate this. Quote Link to comment Share on other sites More sharing options...
samifox Posted March 28, 2014 Author Share Posted March 28, 2014 ok but how can i loop it all across the lines? Quote Link to comment Share on other sites More sharing options...
marko_ribar Posted March 28, 2014 Share Posted March 28, 2014 Shay, maybe this can help you : (defun c:fss (/ ssxunlocked ss i e sss) (defun ssxunlocked (/ filter elst ss) (setq filter "") (while (setq elst (tblnext "layer" (null elst))) (if (= 4 (logand 4 (cdr (assoc 70 elst)))) (setq filter (strcat filter (cdr (assoc 2 elst)) ",")) ) ) (and (= filter "")(setq filter "~*")) (setq ss (ssget "_X" (list (cons 0 "*") (cons -4 "<not") (cons 8 filter) (cons -4 "not>")))) ss ) (defun fastsel (e / ss i ent) (vl-load-com) (setq ss (ssxunlocked)) (setq i -1) (if (null sss) (setq sss (ssadd))) (while (setq ent (ssname ss (setq i (1+ i)))) (if (not (eq e ent)) (if (vlax-invoke (vlax-ename->vla-object e) 'intersectwith (vlax-ename->vla-object ent) acextendnone) (ssadd ent sss) ) ) ) (ssadd e sss) ) (prompt "\nSelect fast selection object(s) with touching for entities on unlocked layers") (setq ss (ssget "_:L")) (setq i -1) (while (setq e (ssname ss (setq i (1+ i)))) (fastsel e) ) (sssetfirst nil sss) (princ) ) Quote Link to comment Share on other sites More sharing options...
troggarf Posted March 28, 2014 Share Posted March 28, 2014 This is one of my favorites. It joins all objects that touch at their endpoints and all you have to do, is select one object that is among the "chain" of objects. http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/Lines-to-pline-in-one-step/m-p/3533752/highlight/true Quote Link to comment Share on other sites More sharing options...
mostafa badran Posted March 28, 2014 Share Posted March 28, 2014 ok but how can i loop it all across the lines? I agree with MSasu tray pedit,Multiple,join and change the fuzz distance as you wish. HTH mostafa Quote Link to comment Share on other sites More sharing options...
zaphod Posted March 28, 2014 Share Posted March 28, 2014 I like that lisp Greg B, looks useful, it might end up on my top 20 list, only time will tell. 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.